[clang] [analyzer] Wrap SymbolicRegions by ElementRegions before getting a FieldRegion (PR #85211)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 05:13:23 PDT 2024


https://github.com/NagyDonat approved this pull request.

Looks good overall, my only inline comment is a minor stylistic question.

I think it's good that we're moving towards establishing the invariant that the parent of a FieldRegion should always be a typed value region (of a suitable type) for the sake of consistency. Do I understand it correctly that this is not too far away? Would it be possible to add an `assert` that mandates this?

On the other hand, I still feel that it's problematic that we're using `ElementRegion` to represent three different things (real element access, pointer arithmetic, type conversions). Even changing the name to something more general would be a step forward. Of course fixing this mess is a difficult long-term goal, and until then it's fine to work with the currently existing tools.

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


More information about the cfe-commits mailing list