derived-to-base.cpp revision 2c5f8d79ed128892fa548a3308a938a3a53fbb5e
1// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store region %s 2 3class A { 4protected: 5 int x; 6}; 7 8class B : public A { 9public: 10 void f(); 11}; 12 13void B::f() { 14 x = 3; 15} 16 17 18class C : public B { 19public: 20 void g() { 21 // This used to crash because we are upcasting through two bases. 22 x = 5; 23 } 24}; 25