blob: eecaf2f6c79995d99ac58ac5ed4fd28713ed154e [file] [log] [blame]
Douglas Gregord7b9e9f2009-06-22 23:57:29 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
3template<typename T, typename U>
4struct X {
5 T f(T x, U y) { return x + y; }
6
7 unsigned g(T x, U y) { return sizeof(f(x, y)); }
8};
9
10void test(X<int, int> *xii, X<int*, int> *xpi, X<int, int*> *xip) {
11 (void)xii->f(1, 2);
12 (void)xpi->f(0, 2);
13 (void)sizeof(xip->f(2, 0)); // okay: does not instantiate
14 (void)xip->g(2, 0); // okay: does not instantiate
15}
16