[clang] [LifetimeSafety] Overhaul CFG and analysis to also work with trivially destructed temporary objects (PR #177985)
Abhinav Pradeep via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 12 02:54:32 PST 2026
================
@@ -5997,6 +6041,13 @@ static void print_elem(raw_ostream &OS, StmtPrinterHelper &Helper,
OS << " (Lifetime ends)";
----------------
AbhinavPradeep wrote:
I have it such that for this code we would see the lifetime marker:
```
...
16: (FullExprCleanup collected 3 MTEs: [B1.7], [B1.13], std::allocator<char>())
...
```
That is, we print the block index when tracked, and otherwise fall back to pretty printing the sub expression. Does this sound good?
https://github.com/llvm/llvm-project/pull/177985
More information about the cfe-commits
mailing list