1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s
3 void clang_analyzer_eval(bool);
5 namespace basic_tests
{
21 clang_analyzer_eval(b
.x
== 1); // expected-warning{{TRUE}}
26 clang_analyzer_eval(c
.x
== 2); // expected-warning{{TRUE}}
28 } // namespace basic_tests
30 namespace arguments_with_constructors
{
33 S(int x
, int y
): x(x
), y(y
) {}
40 A(S s
, int z
) : s(s
), z(z
) {}
49 // FIXME: There should be no execution path on which this is false.
50 clang_analyzer_eval(b
.s
.x
== 1); // expected-warning{{TRUE}}
51 // expected-warning@-1{{FALSE}}
53 // FIXME: There should be no execution path on which this is false.
54 clang_analyzer_eval(b
.s
.y
== 2); // expected-warning{{TRUE}}
55 // expected-warning@-1{{FALSE}}
57 clang_analyzer_eval(b
.z
== 3); // expected-warning{{TRUE}}
59 } // namespace arguments_with_constructors
61 namespace inherited_constructor_crash
{
67 using a::a
; // Ihnerited ctor.
71 // This construct expr utilizes the inherited ctor.
72 // Note that d must be uninitialized to cause the crash.
73 (b(d
)); // expected-warning{{1st function call argument is an uninitialized value}}
75 } // namespace inherited_constructor_crash