xazax.hun added a comment.

I like the idea of making `ProgramState::getSVal(const MemRegion *)` symmetric 
to `ProgramState::getSVal(Loc)`.

Just some philosophical questions which should probably be addressed in the 
future:
But also I wonder, should we maintain all these overloads? I mean, a lot of the 
APIs accept both `SVal`/`Loc` and `MemRegion *`. Usually, one of the 
implementations will end up just calling the other after some 
wrapping/unwrapping.  Maybe ripping `MemRegion *` from the APIs would make it 
easier to use? E.g.: CallAndMessageChecker just unwraps the region from an SVal 
just to wrap it back again within the API call. However, we tend to use 
`MemRegion *` when storing info in the program state.

Otherwise LGTM!



================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h:307
   /// Returns the "raw" SVal bound to LV before any value simplfication.
   SVal getRawSVal(Loc LV, QualType T= QualType()) const;
 
----------------
The whitespace here is a bit off. I know it is not related to this patch, but 
this could be fixed if we already touch this file.


https://reviews.llvm.org/D38801



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to