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

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 1 10:24:17 PST 2025


================
@@ -3195,7 +3196,11 @@ bool Parser::ParseExpressionList(SmallVectorImpl<Expr *> &Exprs,
       SawError = true;
       if (FailImmediatelyOnInvalidExpr)
         break;
-      SkipUntil(tok::comma, tok::r_paren, StopAtSemi | StopBeforeMatch);
+
+      if (StopAtRBraceAfterComma)
+        SkipUntil(tok::comma, tok::r_brace, StopAtSemi | StopBeforeMatch);
----------------
Sirraide wrote:

This is because we expect the expression-list to be terminated by a `}` rather than a `)` if we’re parsing an expansion-init-list; I added a comment that explains that.

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


More information about the llvm-branch-commits mailing list