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

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 10 02:00:17 PDT 2025


================
@@ -5251,6 +5263,10 @@ static bool EvaluateCond(EvalInfo &Info, const VarDecl *CondDecl,
     return false;
   if (!EvaluateAsBooleanCondition(Cond, Result, Info))
     return false;
+  if (auto *DD = dyn_cast_if_present<DecompositionDecl>(CondDecl);
+      DD && DD->isDecisionVariable() &&
----------------
cor3ntin wrote:

Can `DD->isDecisionVariable()` be false here? Should we assert instead?

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


More information about the cfe-commits mailing list