[clang] [analyzer] Never create Regions wrapping reference TypedValueRegions (NFCI) (PR #118096)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 29 08:03:57 PST 2024
steakhal wrote:
> The change itself looks good to me, but I wonder what is the reason that we only want to do this canonicalization when we access fields?
It took me a while to unwrap your question. Actually, think of it as an invariant. We should never have reference typed value regions wrapped by subregions. This is checked/enforced by how we create subregions (see the asserts).
The second is, how can we end up with such subregions. I think the only way is by field regions. If we had something that I missed, the assert would catch it.
Do you have something in mind?
https://github.com/llvm/llvm-project/pull/118096
More information about the cfe-commits
mailing list