[clang] [LifetimeSafety] Overhaul CFG and analysis to also work with trivially destructed temporary objects (PR #177985)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 10 10:55:21 PST 2026


================
@@ -469,12 +461,10 @@ void FactsGenerator::handleLifetimeEnds(const CFGLifetimeEnds &LifetimeEnds) {
   }
 }
 
-void FactsGenerator::handleTemporaryDtor(
-    const CFGTemporaryDtor &TemporaryDtor) {
-  const CXXBindTemporaryExpr *ExpiringBTE =
-      TemporaryDtor.getBindTemporaryExpr();
-  if (!ExpiringBTE)
-    return;
+void FactsGenerator::handleFullExprCleanup(
+    const CFGFullExprCleanup &FullExprCleanup) {
+  ArrayRef<const MaterializeTemporaryExpr *> CollectedMTEs =
----------------
usx95 wrote:

nit: inline this at the usage as there is only one usage.

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


More information about the cfe-commits mailing list