blob: f6c9beb46576cac1a77be938cfba3fd6f7ad111d [file] [log] [blame]
Argyrios Kyrtzidisc4d2c902011-02-28 19:49:42 +00001// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store region %s
Zhongxing Xu4fd56812010-11-26 08:21:53 +00002
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}
Jordan Rose2c5f8d72012-08-09 21:24:02 +000016
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};