blob: 0bdc3e9875973e2c395a5b2f21b3f8ff7a42bb98 [file] [log] [blame]
Douglas Gregor8e458f42009-02-09 18:46:07 +00001// RUN: clang -fsyntax-only -verify %s
2template<typename T> struct A { };
3
4typedef A<int> A_int;
5
6float *foo(A<int> *ptr, A<int> const *ptr2) {
7 if (ptr)
8 return ptr; // expected-error{{incompatible type returning 'A<int> *', expected 'float *'}}
9 else if (ptr2)
10 return ptr2; // expected-error{{incompatible type returning 'A<int> const *', expected 'float *'}}
11 else {
12 // FIXME: This is completely bogus, but we're using it temporarily
13 // to test the syntactic sugar for class template specializations.
14 int *ip = ptr;
15 return 0;
16 }
17}