| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| template<typename T, typename U = float> struct A { }; |
| A<int, FLOAT> *foo(A<int> *ptr, A<int> const *ptr2, A<int, double> *ptr3) { |
| return ptr2; // expected-error{{incompatible type returning 'A<int> const *', expected 'A<int, FLOAT> *'}} |
| return ptr3; // expected-error{{incompatible type returning 'A<int, double> *', expected 'A<int, FLOAT> *'}} |
| template<int I> struct B; |
| B<17 + 2> *bar(B<(19)> *ptr1, B< (::value + 7) > *ptr2, B<19 - 3> *ptr3) { |
| return ptr3; // expected-error{{incompatible type returning 'B<19 - 3> *', expected 'B<17 + 2> *'}} |
| template<typename T> struct C {}; |
| template<typename T> struct Foo { }; // expected-note{{template is declared here}} |
| void f(void) { Foo bar; } // expected-error{{without a template argument list}} |