[clang] [LifetimeSafety] Store cleanup statements for temporaries (PR #200568)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 05:34:15 PDT 2026


================
@@ -318,8 +318,14 @@ class CFGFullExprCleanup : public CFGElement {
 
 public:
   using MTEVecTy = BumpVector<const MaterializeTemporaryExpr *>;
-  explicit CFGFullExprCleanup(const MTEVecTy *MTEs)
-      : CFGElement(FullExprCleanup, MTEs, nullptr) {}
+  explicit CFGFullExprCleanup(const MTEVecTy *MTEs, const Stmt *CleanupStmt)
----------------
usx95 wrote:

I think we can be more specific here. Instead of general `Stmt`, we could have `ExprWithCleanups`.

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


More information about the cfe-commits mailing list