[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 7 05:14:21 PDT 2025
https://github.com/usx95 commented:
> Something for future PRs: I think it would be nice to have some sort of coverage statistics. While initially you do not aim to cover all of C++, it would be good to know what portion of nodes are missing from the fact generation when we run this on some real world code. That can give us some progress indicators.
Good idea. I was thinking along similar lines and have some ideas for initial metrics:
- Use an RAV to visit all expressions in a function and count number of expressions which should have an origin (i.e., it is of pointer type) but does not have an origin associated with the expression.
- Count origins that are created but are never associated with a Loan; this would be a signal that we don't understand the pointer's source.
I will add these in a follow-up patch.
https://github.com/llvm/llvm-project/pull/142313
More information about the cfe-commits
mailing list