================
@@ -1297,6 +1286,27 @@ bool Parser::ParseParenExprOrCondition(StmtResult 
*InitStmt,
                                     /*MissingOK=*/false);
   }
 
+  if (!getLangOpts().CPlusPlus) {
+    if (InitStmt != nullptr && InitStmt->isUsable()) {
+      // Handle the 2 clauses of declaration: (clause1; clause2).
+      if (!isa<DeclStmt, AttributedStmt, NullStmt>(InitStmt->get()))
----------------
Sirraide wrote:

Can you add a comment here explaining that we need to allow `NullStmt` because 
that’s what we end up w/ if we have an empty _attribute-specifier-sequence_? 
Because that’s very much not obvious

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

Reply via email to