| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | template<typename T=int> struct S {}; |
| 4 | template<typename> void f(); |
| 5 | |
| 6 | void foo(void) { |
| 7 | foo<<<1; // expected-error {{expected '>>>'}} expected-note {{to match this '<<<'}} |
| 8 | |
| 9 | foo<<<1,1>>>; // expected-error {{expected '('}} |
| 10 | |
| 11 | foo<<<>>>(); // expected-error {{expected expression}} |
| 12 | |
| 13 | // The following two are parse errors because -std=c++11 is not enabled. |
| 14 | |
| 15 | S<S<S<int>>> s; // expected-error 2{{use '> >'}} |
| 16 | S<S<S<>>> s1; // expected-error 2{{use '> >'}} |
| 17 | (void)(&f<S<S<int>>>==0); // expected-error 2{{use '> >'}} |
| 18 | (void)(&f<S<S<>>>==0); // expected-error 2{{use '> >'}} |
| 19 | } |
| 20 | |