Home | History | Annotate | Download | only in Analysis
      1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s
      2 
      3 void clang_analyzer_eval(bool);
      4 
      5 class A {
      6   int x;
      7 public:
      8   A();
      9   int getx() const {
     10     return x;
     11   }
     12 };
     13 
     14 A::A() : x(0) {
     15 }
     16 
     17 class B : public A {
     18   int y;
     19 public:
     20   B();
     21 };
     22 
     23 B::B() {
     24 }
     25 
     26 void f() {
     27   B b;
     28   clang_analyzer_eval(b.getx() == 0); // expected-warning{{TRUE}}
     29 }
     30