[clang] [Clang][C2y] Add support for if declarations (N3356 paper) (PR #198244)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 11 05:24:14 PDT 2026


================
@@ -1880,16 +1880,70 @@ Sema::ConditionResult Parser::ParseCXXCondition(StmtResult *InitStmt,
     return Sema::ConditionError();
   }
 
+  if (!getLangOpts().CPlusPlus && Tok.is(tok::kw___extension__)) {
----------------
AaronBallman wrote:

I don't think this is specific to C, we support `__extension__` in C++ as well and that also fails: https://godbolt.org/z/soexsEnYP

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


More information about the cfe-commits mailing list