[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 19 12:21:14 PST 2018


NoQ marked an inline comment as done.
NoQ added inline comments.


================
Comment at: test/Analysis/bstring.cpp:47
 
+  // The TRUE warning shows up on the path on which the vector is empty.
   clang_analyzer_eval(i == 66); // expected-warning {{UNKNOWN}}
----------------
dcoughlin wrote:
> This seems like it will be a big analysis policy change from the user's perspective and is likely to generate a bunch of new reports.
> 
> Can the user add an assertion that v.size() > 0 to tell the analyzer that the path on which the vector is empty is not feasible?
> 
> What are the diagnostic notes look like? Can the user tell that the the analyzer is assuming that begin() == end() on that path?
> 
Ugh! This change is actually due to D55873, i just didn't run the tests properly. Will re-think  :o


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55875/new/

https://reviews.llvm.org/D55875





More information about the cfe-commits mailing list