[clang] [NFC][LifetimeSafety]: Track assignment history within a single CFGBlock (PR #196075)
Yuan Suo via cfe-commits
cfe-commits at lists.llvm.org
Thu May 7 23:00:02 PDT 2026
suoyuan666 wrote:
> I would like this PR to track only origins participating in the OriginFlows responsible for propagating the loan. Let us not focus on getting the expressions. This means deleting `getRootSrcExpr, getDestEntity, getSrcEntity, DestOriginEntity, SrcOriginEntity`.
>
> Getting expressions out of the origins should be possible after the flow chain is identified and can be handled when we start to use this in diagnostics PR.
I have shifted the logic from tracing expressions to tracing Origins.
Currently, I only store the `SrcOrigin`, as it will become the `DestOrigin` of the preceding expression. Since the `DestOrigin` of the final expression is simply the `Origin` corresponding to the misused variable, I believe it might be unnecessary to record it.
please let me know if I missed anything.
https://github.com/llvm/llvm-project/pull/196075
More information about the cfe-commits
mailing list