diff options
author | John McCall <rjmccall@apple.com> | 2010-08-24 23:26:21 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-24 23:26:21 +0000 |
commit | c988fab9860e83f25ef51101fef162b49380582b (patch) | |
tree | 504d9e22e7120b6871b8571585c653f4c88b9421 /test/CXX/class/class.mfct | |
parent | 28a7f258aefdd58db0bbf3a903f053bf2cb69c90 (diff) |
Catch the case of trying to turn '&(X::a)' into a member pointer as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/class/class.mfct')
-rw-r--r-- | test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp b/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp index 7e09bc8aef..c81e4ef1b1 100644 --- a/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp +++ b/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp @@ -91,28 +91,3 @@ namespace test2 { a.test3(); // expected-note {{in instantiation}} } } - -namespace test3 { - struct A { - void foo(void (A::*)(int)); // expected-note {{passing argument to parameter here}} - template<typename T> void g(T); - - void test() { - foo(&g<int>); // expected-error {{cannot initialize a parameter}} - } - }; -} - -// This should succeed. -namespace test4 { - struct A { - static void f(void (A::*)()); - static void f(void (*)(int)); - void g(); - static void g(int); - - void test() { - f(&g); - } - }; -} |