[clang] [CIR] Implement cleanup handling for destructor ILE initializers (PR #192172)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 15 09:16:18 PDT 2026
================
@@ -1189,10 +1189,14 @@ void AggExprEmitter::visitCXXParenListOrInitListExpr(
// Push a destructor if necessary.
// FIXME: if we have an array of structures, all explicitly
// initialized, we can end up pushing a linear number of cleanups.
- if (field->getType().isDestructedType()) {
- cgf.cgm.errorNYI(e->getSourceRange(),
- "visitCXXParenListOrInitListExpr destructor");
- return;
+ if (QualType::DestructionKind dtorKind =
+ field->getType().isDestructedType()) {
+ assert(lv.isSimple());
+ if (dtorKind) {
----------------
andykaylor wrote:
Yeah. Copy and paste from classic codegen.
https://github.com/llvm/llvm-project/pull/192172
More information about the cfe-commits
mailing list