1 // RUN: %clang_cc1 -fsyntax-only -verify=expected,precxx17 %std_cxx98-14 %s
2 // RUN: %clang_cc1 -fsyntax-only -verify %std_cxx17- %s
5 static void member() { T
* x
= 1; } // precxx17-error{{cannot initialize a variable of type 'int *' with an rvalue of type 'int'}}
8 template<void(*)()> struct instantiate
{ };
12 typedef instantiate
<&X1
<int>::member
> i
; // precxx17-note{{in instantiation of}}
17 template <class T
, class A
> class C
{
24 // expected-error@+2 {{'int' is not a class, namespace, or enumeration}}
25 // expected-error@+1 {{no member named '~Colors' in 'Colors'}}
27 // expected-error@+2 {{no member named '~int' in 'Q'}}
28 // expected-error@+1 {{no member named '~Colors' in 'Q'}}
41 enum Colors
{red
, green
, blue
};
44 C
<Q
, Colors
> dummyColors
;
47 // expected-note@+1 {{in instantiation of member function 'C<Q, int>::f' requested here}}
49 // expected-note@+1 {{in instantiation of member function 'C<Q, Colors>::f' requested here}}