[libc++][NFC] Remove trailing whitespace from release notes
[llvm-project.git] / clang / test / CXX / expr / expr.unary / expr.unary.op / p3.cpp
blob08ab0ca56fb6328e641aec0483dfd80a7fcf0e9c
1 // RUN: %clang_cc1 -fsyntax-only %s -verify
2 // expected-no-diagnostics
4 namespace rdar10544564 {
5 // Check that we don't attempt to use an overloaded operator& when
6 // naming a pointer-to-member.
7 struct X {
8 void** operator & ();
9 };
11 struct Y
13 public:
14 X member;
15 X memfunc1();
16 X memfunc2();
17 X memfunc2(int);
19 void test() {
20 X Y::*data_mem_ptr = &Y::member;
21 X (Y::*func_mem_ptr1)() = &Y::memfunc1;
22 X (Y::*func_mem_ptr2)() = &Y::memfunc2;
26 X Y::*data_mem_ptr = &Y::member;
27 X (Y::*func_mem_ptr1)() = &Y::memfunc1;
28 X (Y::*func_mem_ptr2)() = &Y::memfunc2;