diff options
author | Marek Polacek <polacek@redhat.com> | 2024-09-23 12:19:40 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2024-09-23 15:24:07 -0400 |
commit | 4700ad1c78ccd7767f846802fca148b2ea9a1852 (patch) | |
tree | d1766e6f30630745d78b984d82746f1d16300ca5 /libobjc/exception.c | |
parent | c1fb78fb03caede01b02a1ebb3275ac98343d468 (diff) | |
download | gcc-4700ad1c78ccd7767f846802fca148b2ea9a1852.zip gcc-4700ad1c78ccd7767f846802fca148b2ea9a1852.tar.gz gcc-4700ad1c78ccd7767f846802fca148b2ea9a1852.tar.bz2 |
c++: diagnose this specifier in requires expr [PR116798]
We don't detect an explicit object parameter in a requires expression.
We can get there by way of requires-expression -> requirement-parameter-list
-> parameter-declaration-clause -> ... -> parameter-declaration with
this[opt]. But [dcl.fct]/5 doesn't allow an explicit object parameter
in this context. So let's fix it like r14-9033 and not like r14-8832.
PR c++/116798
gcc/cp/ChangeLog:
* parser.cc (cp_parser_parameter_declaration): Detect an explicit
object parameter in a requires expression.
gcc/testsuite/ChangeLog:
* g++.dg/cpp23/explicit-obj-diagnostics12.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libobjc/exception.c')
0 files changed, 0 insertions, 0 deletions