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

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 08:00:32 PDT 2024


================
@@ -226,6 +226,20 @@ ProgramStateRef ProgramState::killBinding(Loc LV) const {
   return makeWithStore(newStore);
 }
 
+/// FieldRegions are expected to be wrapped by an ElementRegion as a canonical
+/// representation. See f8643a9b31c4029942f67d4534c9139b45173504 why.
----------------
NagyDonat wrote:

It seems that in this comment the `FieldRegion` is a mistake and should be changed to `SymbolicRegion`. (But perhaps the comment should be extended to something like "As a canonical representation, SymbolicRegions should be wrapped by ElementRegions before getting a FieldRegion" to mention all three layers of this trickery.)

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


More information about the cfe-commits mailing list