[cfe-commits] r128158 - /cfe/trunk/test/SemaCXX/ptrtomember.cpp
Marshall Clow
mclow at qualcomm.com
Wed Mar 23 12:44:36 PDT 2011
Author: marshall
Date: Wed Mar 23 14:44:36 2011
New Revision: 128158
URL: http://llvm.org/viewvc/llvm-project?rev=128158&view=rev
Log:
Add a test for !ptr-to-member (should fail)
Modified:
cfe/trunk/test/SemaCXX/ptrtomember.cpp
Modified: cfe/trunk/test/SemaCXX/ptrtomember.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/ptrtomember.cpp?rev=128158&r1=128157&r2=128158&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/ptrtomember.cpp (original)
+++ cfe/trunk/test/SemaCXX/ptrtomember.cpp Wed Mar 23 14:44:36 2011
@@ -27,6 +27,7 @@
(void)(void*)(p->*m); // expected-error {{a bound member function may only be called}}
(void)reinterpret_cast<void*>(p->*m); // expected-error {{a bound member function may only be called}}
if (p->*m) {} // expected-error {{a bound member function may only be called}}
-
- p->m; // expected-error {{a bound member function may only be called}}
+ if (!p->*m) {} // expected-error {{a bound member function may only be called}}
+ if (p->m) {}; // expected-error {{a bound member function may only be called}}
+ if (!p->m) {}; // expected-error {{a bound member function may only be called}}
}
More information about the cfe-commits
mailing list