ygribov added inline comments.
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}}
+ }
zaks.anna wrote:
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}}
+ }
--
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253532: [analyzer] Improve modeling of static initializers.
(authored by zaks).
Changed prior to commit:
http://reviews.llvm.org/D14652?vs=40144&id=40582#toc
Repository:
rL LLVM
http://reviews.llvm.
ygribov added inline comments.
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}}
+ }
zaks.anna wrote:
zaks.anna added inline comments.
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}}
+ }
Why are we che
ygribov created this revision.
ygribov added reviewers: zaks.anna, dcoughlin, jordan_rose.
ygribov added a subscriber: cfe-commits.
Conversions between unrelated pointer types (e.g. char * and void *) involve
bitcasts which were not properly modeled in case of static initializers. The
patch fixe