[clang] [LifetimeSafety] Fix false positives for pointers in loops (PR #182368)

Zhijie Wang via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 13 00:17:40 PDT 2026


aeft wrote:

Updated. The latest implementation reuses `ExpireFact` with an optional `OriginID` field and handles it in the transfer functions. One thing to note: the `OriginID` is set on every `ExpireFact` for the variable, even though multiple may be emitted (one per loan). This is idempotent and doesn't affect correctness. After the refactor to use `AccessPath` in #180369, only one fact will be emitted per variable.

@usx95 @Xazax-hun Could you take a look when you have a moment? Thanks.

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


More information about the cfe-commits mailing list