================
@@ -2371,6 +2371,20 @@ StmtResult Parser::ParseForStatement(SourceLocation 
*TrailingElseLoc,
 
   MisleadingIndentationChecker MIChecker(*this, MSK_for, ForLoc);
 
+  // If this is an expansion statement with a known expansion size of 0, parse
+  // the body as a discarded statement.
+  bool ShouldEnterDiscardedContext = false;
+  if (ESD && ForRangeStmt.isUsable()) {
+    auto *Pattern = ForRangeStmt.getAs<CXXExpansionStmtPattern>();
+    ShouldEnterDiscardedContext = Pattern->getExpansionSize() == 0u;
----------------
Sirraide wrote:

Yes

https://github.com/llvm/llvm-project/pull/212319
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to