Douglas Gregor | 1fd6d44 | 2010-05-21 23:18:07 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | template<typename T, typename U, int N> |
| 3 | struct X { |
| 4 | void f(T* t) { |
| 5 | t->f0<U>(); // expected-error{{use 'template' keyword to treat 'f0' as a dependent template name}} |
| 6 | t->f0<int>(); // expected-error{{use 'template' keyword to treat 'f0' as a dependent template name}} |
| 7 | |
| 8 | t->operator+<U const, 1>(); // expected-error{{use 'template' keyword to treat 'operator +' as a dependent template name}} |
| 9 | t->f1<int const, 2>(); // expected-error{{use 'template' keyword to treat 'f1' as a dependent template name}} |
| 10 | |
| 11 | // FIXME: We can't recover from these yet |
| 12 | (*t).f2<N>(); // expected-error{{expected expression}} |
| 13 | (*t).f2<0>(); // expected-error{{expected expression}} |
| 14 | } |
| 15 | }; |