File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
CXX/dcl.decl/dcl.meaning/dcl.fct Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,8 @@ bool Parser::ParseOptionalCXXScopeSpecifier(
238238
239239 else if (!HasScopeSpecifier && Tok.is (tok::identifier) &&
240240 GetLookAheadToken (1 ).is (tok::ellipsis) &&
241- GetLookAheadToken (2 ).is (tok::l_square)) {
241+ GetLookAheadToken (2 ).is (tok::l_square) &&
242+ !GetLookAheadToken (3 ).is (tok::r_square)) {
242243 SourceLocation Start = Tok.getLocation ();
243244 DeclSpec DS (AttrFactory);
244245 SourceLocation CCLoc;
Original file line number Diff line number Diff line change @@ -57,10 +57,11 @@ template<typename T>
5757void b (T[] ...);
5858
5959template <typename T>
60- void c (T ... []); // expected-error {{expected expression}} \
61- // expected-error {{type 'T[]' of function parameter pack does not contain any unexpanded parameter packs}} \
62- // expected-warning {{would become a pack indexing declaration in C++2c onwards}} \
63- // expected-note {{add a name to disambiguate}}
60+ void c (T ... []); // expected-error {{type 'T[]' of function parameter pack does not contain any unexpanded parameter packs}}
61+
62+ // A function that takes pointers to each type T as arguments, after any decay.
63+ template <typename ...T>
64+ void g (T...[]);
6465
6566template <typename T>
6667void d (T ... x[]); // expected-error{{type 'T[]' of function parameter pack does not contain any unexpanded parameter packs}}
Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ struct S {
1212 // expected-note {{to match this '['}} \
1313 // expected-warning{{declaration does not declare anything}}
1414
15- T...[]; // expected-error{{expected expression}} \
16- // expected-warning{{declaration does not declare anything}}
15+ T...[]; // expected-error{{expected member name or ';' after declaration specifiers}}
1716
1817 void f (auto ... v) {
1918 decltype (v...[1 ]) a = v...[1 ];
@@ -65,7 +64,7 @@ int main() {
6564}
6665
6766
68- namespace GH11460 {
67+ namespace GH111460 {
6968template <typename ... T>
7069requires ( ); // expected-error {{expected expression}}
7170struct SS {
You can’t perform that action at this time.
0 commit comments