================ @@ -1105,19 +1105,24 @@ void CodeGenFunction::EmitNewArrayInitializer( } // Enter a partial-destruction Cleanup if necessary. - if (needsEHCleanup(DtorKind)) { + if (DtorKind) { + AllocaTrackerRAII AllocaTracker(*this); ---------------- usx95 wrote:
Unfortunately, that is not the case. We do create more allocas in conditional branches in `pushFullExprCleanup`, for eg: create `cond-cleanup.save` allocas in `DominatingLLVMValue::save` ([src](https://github.com/llvm/llvm-project/blob/e93b5f5a4776ffea12d03652559dfdf8d421184c/clang/lib/CodeGen/CodeGenFunction.h#L5184)). https://github.com/llvm/llvm-project/pull/85398 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits