summaryrefslogtreecommitdiff
path: root/test/SemaCXX/address-of.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/address-of.cpp')
-rw-r--r--test/SemaCXX/address-of.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/address-of.cpp b/test/SemaCXX/address-of.cpp
index a7e712b04c1db..69fcaff8f1ed4 100644
--- a/test/SemaCXX/address-of.cpp
+++ b/test/SemaCXX/address-of.cpp
@@ -33,3 +33,14 @@ void test2() {
// PR clang/3222
void xpto();
void (*xyz)(void) = &xpto;
+
+struct PR11066 {
+ static int foo(short);
+ static int foo(float);
+ void test();
+};
+
+void PR11066::test() {
+ int (PR11066::*ptr)(int) = & &PR11066::foo; // expected-error{{address expression must be an lvalue or a function designator}}
+}
+