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

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 18 20:38:18 PST 2018


dcoughlin added a comment.

These seems reasonable, although it does also seem like there could be quite a few unintended consequences that we haven't discovered yet.

I'm also a bit worried about the change in the analyzer's behavior on copy(). Do you have a sense of how much of an effect this will have and how easy potential false positives from this will be to suppress?



================
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}}
----------------
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?



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