diff options
Diffstat (limited to 'clang/test/Analysis/misc-ps-cxx0x.cpp')
-rw-r--r-- | clang/test/Analysis/misc-ps-cxx0x.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-cxx0x.cpp b/clang/test/Analysis/misc-ps-cxx0x.cpp index e1c78ed0723..8e31c8db8c9 100644 --- a/clang/test/Analysis/misc-ps-cxx0x.cpp +++ b/clang/test/Analysis/misc-ps-cxx0x.cpp @@ -109,3 +109,10 @@ void test_ic_null(TestInstanceCall *p) { p->foo(); // expected-warning {{Called C++ object pointer is null}} } +void test_ic_member_ptr() { + TestInstanceCall *p = 0; + typedef void (TestInstanceCall::*IC_Ptr)(); + IC_Ptr bar = &TestInstanceCall::foo; + (p->*bar)(); // expected-warning {{Called C++ object pointer is null}} +} + |