diff options
Diffstat (limited to 'test/Analysis/misc-ps-cxx0x.cpp')
-rw-r--r-- | test/Analysis/misc-ps-cxx0x.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test/Analysis/misc-ps-cxx0x.cpp b/test/Analysis/misc-ps-cxx0x.cpp index 8e31c8db8c..164af5dc3d 100644 --- a/test/Analysis/misc-ps-cxx0x.cpp +++ b/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}} -} - |