[clang] Assertion `!isNull() && "Cannot retrieve a NULL type pointer"` with expansion statement (PR #218710)

Ambrose Leeb via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 28 09:03:23 PDT 2026


================
@@ -521,16 +521,40 @@ ExprResult Parser::ParseExpansionInitList() {
   T.consumeOpen();
 
   ExprVector InitExprs;
+  bool SawError = false;
+  while (Tok.isNot(tok::r_brace)) {
+    ExprResult Elem = Tok.is(tok::l_brace) ? ParseBraceInitializer()
----------------
Sirraide wrote:

I believe you’d have to push the expression evaluation context for each element here when we parse it

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


More information about the cfe-commits mailing list