diff options
Diffstat (limited to 'clang/test/SemaCXX/address-of.cpp')
| -rw-r--r-- | clang/test/SemaCXX/address-of.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/address-of.cpp b/clang/test/SemaCXX/address-of.cpp index a7e712b04c1..69fcaff8f1e 100644 --- a/clang/test/SemaCXX/address-of.cpp +++ b/clang/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}} +} + |

