1 // RUN: %clang_cc1 -fsyntax-only -verify %s
14 static void wibble() {
15 bar(&var
); // expected-error{{invalid use of member 'var' in static member function}}
25 (void)&Enumerator
; // expected-error{{cannot take the address of an rvalue of type 'E'}}
30 (void)&N
; // expected-error{{cannot take the address of an rvalue of type 'int'}}
35 void (*xyz
)(void) = &xpto
;
38 static int foo(short);
39 static int foo(float);
43 void PR11066::test() {
44 int (PR11066::*ptr
)(int) = & &PR11066::foo
; // expected-error{{extra '&' taking address of overloaded function}}
49 template<typename T
> struct S
{
52 template<typename T
> void S
<T
>::f() { T::error
; }
53 void (S
<int>::*p
)() = &S
<int>::f
;