blob: 9cf2ca5129e30ab2f12ac3606289ea967b3c88ff [file] [log] [blame]
Douglas Gregorb4850462009-05-14 23:26:13 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
3template<typename T, typename U>
4struct X0 {
5 void f(T x, U y) {
6 x + y; // expected-error{{invalid operands}}
7 }
8};
9
10struct X1 { };
11
12template struct X0<int, float>;
13template struct X0<int*, int>;
14template struct X0<int X1::*, int>; // expected-note{{instantiation of}}
Douglas Gregor0555e5f2009-05-14 23:40:54 +000015
16template<typename T>
17struct X2 {
18 void f(T);
19
20 T g(T x, T y) {
21 /* NullStmt */;
22 }
23};
24
25template struct X2<int>;