diff options
Diffstat (limited to 'clang/test/Analysis/misc-ps-cxx0x.cpp')
| -rw-r--r-- | clang/test/Analysis/misc-ps-cxx0x.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/clang/test/Analysis/misc-ps-cxx0x.cpp b/clang/test/Analysis/misc-ps-cxx0x.cpp index 8e31c8db8c9..164af5dc3df 100644 --- a/clang/test/Analysis/misc-ps-cxx0x.cpp +++ b/clang/test/Analysis/misc-ps-cxx0x.cpp @@ -87,32 +87,3 @@ void rdar11817693::operator=(const rdar11817693& src) { operator=(dynamic_cast<const rdar11817693_BaseBase&>(src)); } -// Test warning about null or uninitialized pointer values used as instance member -// calls. -class TestInstanceCall { -public: - void foo() {} -}; - -void test_ic() { - TestInstanceCall *p; - p->foo(); // expected-warning {{Called C++ object pointer is uninitialized}} -} - -void test_ic_null() { - TestInstanceCall *p = 0; - p->foo(); // expected-warning {{Called C++ object pointer is null}} -} - -void test_ic_null(TestInstanceCall *p) { - if (!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}} -} - |

