================ @@ -7331,18 +7332,33 @@ void Parser::ParseDecompositionDeclarator(Declarator &D) { Diag(Tok, diag::err_expected_comma_or_rsquare); } - SkipUntil(tok::r_square, tok::comma, tok::identifier, - StopAtSemi | StopBeforeMatch); + // I don't know why this skipping was here + // SkipUntil(tok::r_square, tok::comma, tok::identifier, + // StopAtSemi | StopBeforeMatch); if (Tok.is(tok::comma)) ConsumeToken(); - else if (Tok.isNot(tok::identifier)) + else if (Tok.is(tok::r_square)) break; } } if (isCXX11AttributeSpecifier()) DiagnoseAndSkipCXX11Attributes(); + SourceLocation EllipsisLoc = {}; + + if (Tok.is(tok::ellipsis)) { + if (!getLangOpts().CPlusPlus26) + Diag(Tok, diag::warn_cxx2c_binding_pack); ---------------- cor3ntin wrote:
We should have an extension warning in c++26 mode (search for `diag::ext_cxx` for examples) https://github.com/llvm/llvm-project/pull/121417 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits