1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s
11 void clang_analyzer_eval(int);
14 // Do not trust global initializers in C++.
15 clang_analyzer_eval(x
== 1); // expected-warning{{TRUE}} // expected-warning{{FALSE}}
16 clang_analyzer_eval(s
.a
== 2); // expected-warning{{TRUE}} // expected-warning{{FALSE}}
17 clang_analyzer_eval(s
.b
== 3); // expected-warning{{TRUE}} // expected-warning{{FALSE}}
18 clang_analyzer_eval(arr
[0] == 4); // expected-warning{{TRUE}} // expected-warning{{FALSE}}
19 clang_analyzer_eval(arr
[1] == 5); // expected-warning{{TRUE}} // expected-warning{{FALSE}}
20 clang_analyzer_eval(arr
[2] == 6); // expected-warning{{TRUE}} // expected-warning{{FALSE}}