================
@@ -2379,6 +2383,9 @@ StmtResult Parser::ParseForStatement(SourceLocation 
*TrailingElseLoc,
       return StmtError();
     }
 
+    if (!isa<CompoundStmt>(Body.get()) || BodyStartsWithSquare)
+      Diag(BodyBeginLoc, diag::ext_expansion_stmt_missing_braces);
+
----------------
cor3ntin wrote:

although, you could check for `AttributedStmt`, i think this would be cleaner 
than looking for a `[`

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

Reply via email to