[clang] [LifetimeSafety] Add multi-block support to buildOriginFlowChain (PR #204592)

Yuan Suo via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 23 06:51:17 PDT 2026


suoyuan666 wrote:

> This seems inaccurate. This would not work when the we do not have the target loan in the origin at the end of block.

I don't think this is an issue, because the `DestOrigin` of subsequent `OriginFlowFact` will not hold the `TargetLoan`, so it is never recorded.

Thanks for the test cases! I've added all of them to `clang/test/.../safety.cpp`.

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


More information about the cfe-commits mailing list