// RUN: clang-cc -fsyntax-only -verify %s template struct X0 { void f(T x, U y) { x + y; // expected-error{{invalid operands}} } }; struct X1 { }; template struct X0; template struct X0; template struct X0; // expected-note{{instantiation of}} template struct X2 { void f(T); T g(T x, T y) { /* DeclStmt */; T *xp = &x, &yr = y; // expected-error{{pointer to a reference}} /* NullStmt */; } }; template struct X2; template struct X2; // expected-note{{instantiation of}} template struct X3 { void f(T) { Label: T x; goto Label; } }; template struct X3; template struct X4 { T f() const { return; // expected-warning{{non-void function 'f' should return a value}} } T g() const { return 1; // expected-warning{{void function 'g' should not return a value}} } }; template struct X4; // expected-note{{in instantiation of template class 'X4' requested here}} template struct X4; // expected-note{{in instantiation of template class 'X4' requested here}} struct Incomplete; // expected-note{{forward declaration}} template struct X5 { T f() { } // expected-error{{incomplete result type}} }; void test_X5(X5 x5); // okay! template struct X5; // expected-note{{instantiation}} template struct X6 { U f(T t, U u, V v) { // IfStmt if (t > 0) return u; else { if (t < 0) return v; // expected-error{{incompatible type}} } return v; } }; struct ConvertibleToInt { operator int() const; }; template struct X6; template struct X6; // expected-note{{instantiation}} template struct X7 { void f() { void *v = this; } }; template struct X7;