diff options
Diffstat (limited to 'test/Analysis/derived-to-base.cpp')
-rw-r--r-- | test/Analysis/derived-to-base.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Analysis/derived-to-base.cpp b/test/Analysis/derived-to-base.cpp new file mode 100644 index 0000000..2a9244e --- /dev/null +++ b/test/Analysis/derived-to-base.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region %s + +class A { +protected: + int x; +}; + +class B : public A { +public: + void f(); +}; + +void B::f() { + x = 3; +} |