[clang] [LifetimeSafety] Fix use-after-scope from #198784 (PR #199455)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 01:27:27 PDT 2026


usx95 wrote:

Thanks for the fix. UAF in Lifetime analysis is pretty ironical :) That's C++ for you!

In hindsight, this would have been caught by lifetime analysis in by making `llvm::reverse` `lifetimebound`. https://godbolt.org/z/YYTdzdhnP but we do not yet use lifetime analysis while building clang.

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


More information about the cfe-commits mailing list