[clang] [CIR] Add limited support for array new (PR #161095)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 29 10:13:56 PDT 2025


================
@@ -418,14 +535,22 @@ mlir::Value CIRGenFunction::emitCXXNewExpr(const CXXNewExpr *e) {
 
   // If there's an operator delete, enter a cleanup to call it if an
   // exception is thrown.
-  if (e->getOperatorDelete() &&
-      !e->getOperatorDelete()->isReservedGlobalPlacementOperator())
-    cgm.errorNYI(e->getSourceRange(), "emitCXXNewExpr: operator delete");
+  // TODO: Handle operator delete cleanup for exception safety
+  // if (e->getOperatorDelete() &&
----------------
andykaylor wrote:

Why did this get commented out?

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


More information about the cfe-commits mailing list