[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 10 04:56:23 PDT 2025


================
@@ -5172,7 +5181,7 @@ template <class Emitter> bool Compiler<Emitter>::visitIfStmt(const IfStmt *IS) {
       return false;
 
   if (const DeclStmt *CondDecl = IS->getConditionVariableDeclStmt())
-    if (!visitDeclStmt(CondDecl))
+    if (!visitDeclStmt(CondDecl, /*EvaluateConditionDecl=*/false))
----------------
cor3ntin wrote:

I think it makes sense to default to false (ditto in other places)

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


More information about the cfe-commits mailing list