blob: 632a11b2e06169a5637353c4e900c5c69a71495c [file] [log] [blame]
Douglas Gregor1fd6d442010-05-21 23:18:07 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2template<typename T, typename U, int N>
3struct 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};