1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify -Wno-reinterpret-base-class -analyzer-config eagerly-assume=false %s
3 void clang_analyzer_eval(bool);
7 virtual int get() { return 0; }
10 void testBifurcation(A
*a
) {
11 clang_analyzer_eval(a
->get() == 0); // expected-warning{{TRUE}} expected-warning{{UNKNOWN}}
16 clang_analyzer_eval(a
.get() == 0); // expected-warning{{TRUE}}
21 clang_analyzer_eval(a
->get() == 0); // expected-warning{{TRUE}}
25 namespace ReinterpretDisruptsDynamicTypeInfo
{
28 class Child
: public Parent
{
30 virtual int foo() { return 42; }
33 void test(Parent
*a
) {
34 Child
*b
= reinterpret_cast<Child
*>(a
);
36 clang_analyzer_eval(b
->foo() == 42); // expected-warning{{UNKNOWN}}