| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| template<class T1> struct C1 { |
| T1 t1 = 3; // expected-error {{cannot initialize a variable}} |
| template<class T2> struct C2 { |
| new C1<T2>(); // expected-note {{in instantiation of member function}} |
| c2.c2(); // expected-note {{in instantiation of member function}} |
| return 1; // expected-error{{cannot initialize return object of type 'int *' with an rvalue of type 'int'}} |
| static Target<T> Instance; |
| Target<T> Provider<T>::Instance; // expected-note{{in instantiation of}} |
| Target<int*>* traits = &Provider<int*>::Instance; // expected-note{{requested here}} |
| virtual void Accept(int) = 0; |
| static_cast<Type *>(0)->Accept(i); // expected-error{{member reference base}} |
| static GMG* Method() { return &singleton; } // expected-note{{in instantiation of}} |
| GMG<Type> GMG<Type>::singleton; // expected-note{{requested here}} |
| GMG<int>::Method(); // expected-note{{in instantiation of}} |