[clang] [CIR] Expr cleanup (PR #169138)

Hendrik Hübner via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 26 06:39:27 PST 2025


================
@@ -219,18 +308,52 @@ class alignas(EHScopeStack::ScopeStackAlignment) EHCleanupScope
     assert(cleanupBits.cleanupSize == cleanupSize && "cleanup size overflow");
   }
 
-  void destroy() {}
   // Objects of EHCleanupScope are not destructed. Use destroy().
   ~EHCleanupScope() = delete;
 
+  void destroy() {
+    if (auxAllocas)
+      delete auxAllocas;
+    delete extInfo;
----------------
HendrikHuebner wrote:

TODO: smart poiners

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


More information about the cfe-commits mailing list