[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 9 10:21:20 PST 2024
================
@@ -978,6 +978,20 @@ bool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {
} else {
break;
}
+ // Pack indexing
+ if (getLangOpts().CPlusPlus26 && Tok.is(tok::ellipsis) &&
----------------
erichkeane wrote:
While I think allowing this in older modes as an extension is perhaps a bridge-too-far, we should probably diagnose the 'else' case here (that is, Tok is ellipsis, NextTok is l_square) as 'not allowed in pre-c++26', and see if we can recover by consuming the tokens anyway.
https://github.com/llvm/llvm-project/pull/72644
More information about the cfe-commits
mailing list