[llvm-branch-commits] [clang] [Clang] [C++26] Expansion Statements (Part 2: Parsing and Parser Tests) (PR #169681)

Erich Keane via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Mar 31 08:54:32 PDT 2026


================
@@ -2657,6 +2793,38 @@ StmtResult Parser::ParseCXXCatchBlock(bool FnCatch) {
   return Actions.ActOnCXXCatchBlock(CatchLoc, ExceptionDecl, Block.get());
 }
 
+StmtResult Parser::ParseExpansionStatement(SourceLocation *TrailingElseLoc,
+                                           LabelDecl *PrecedingLabel,
+                                           SourceLocation TemplateLoc) {
+  assert(Tok.is(tok::kw_for));
+  DiagCompat(TemplateLoc, diag_compat::expansion_statements);
----------------
erichkeane wrote:

Is this dead code?  I am fine leaving it, but we dont' enable this in pre-26 mode above, right? 

https://github.com/llvm/llvm-project/pull/169681


More information about the llvm-branch-commits mailing list