[PATCH] D14652: [analyzer] Improve modeling of static initializers.

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 18 17:29:39 PST 2015


zaks.anna added a comment.

Fixed and committed.


================
Comment at: test/Analysis/inline.cpp:308
@@ +307,3 @@
+    clang_analyzer_eval(0 != void_string); // expected-warning{{TRUE}}
+    clang_analyzer_eval(0 != ((char *)void_string)[1]); // expected-warning{{TRUE}}
+  }
----------------
ygribov wrote:
> zaks.anna wrote:
> > Why are we checking that the first element is not '0'?
> We could check s[0] as well, there is no difference actually.
Why we are checking for non-equality to '0' instead of checking for equality to 'b'?


Repository:
  rL LLVM

http://reviews.llvm.org/D14652





More information about the cfe-commits mailing list