[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 3 07:25:34 PDT 2025


================
@@ -20629,6 +20629,9 @@ Sema::ConditionResult Sema::ActOnCondition(Scope *S, SourceLocation Loc,
 
   case ConditionKind::ConstexprIf:
     Cond = CheckBooleanCondition(Loc, SubExpr, true);
+    assert(isa<FullExpr>(Cond.get()) &&
----------------
cor3ntin wrote:

Good catch!

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


More information about the cfe-commits mailing list