1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s
3 void clang_analyzer_eval(bool);
9 int getx() const { return x
; }
16 void testNullObject(A
*a
) {
17 clang_analyzer_eval(a
); // expected-warning{{UNKNOWN}}
18 (void)a
->getx(); // assume we know what we're doing
19 clang_analyzer_eval(a
); // expected-warning{{TRUE}}
24 clang_analyzer_eval(x
.getx() == 3); // expected-warning{{TRUE}}
29 clang_analyzer_eval(x
.getx() == 3); // expected-warning{{TRUE}}
34 clang_analyzer_eval(x
.getx() == 3); // expected-warning{{TRUE}}
39 clang_analyzer_eval(x
.getx() == 3); // expected-warning{{TRUE}}
42 void checkThatCopyConstructorDoesNotInvalidateObjectBeingCopied() {
46 clang_analyzer_eval(t
.x
== 0); // expected-warning{{TRUE}}