[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 1 13:53:31 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list