• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store region -analyzer-inline-call -cfg-add-initializers -verify %s
2 // XFAIL: *
3 
4 class A {
5   int x;
6 public:
7   A();
getx() const8   int getx() const {
9     return x;
10   }
11 };
12 
A()13 A::A() : x(0) {
14 }
15 
16 class B : public A {
17   int y;
18 public:
19   B();
20 };
21 
B()22 B::B() {
23 }
24 
f()25 void f() {
26   B b;
27   if (b.getx() != 0) {
28     int *p = 0;
29     *p = 0; // no-warning
30   }
31 }
32