diff options
Diffstat (limited to 'test/Parser/cxx-template-decl.cpp')
-rw-r--r-- | test/Parser/cxx-template-decl.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp index 53813776e7..79b04cfc79 100644 --- a/test/Parser/cxx-template-decl.cpp +++ b/test/Parser/cxx-template-decl.cpp @@ -5,10 +5,12 @@ export class foo { }; // expected-error {{expected template}} template x; // expected-error {{expected '<' after 'template'}} export template x; // expected-error {{expected '<' after 'template'}} \ // expected-note {{exported templates are unsupported}} -template < ; // expected-error {{parse error}} -template <template X> ; // expected-error {{expected '<' after 'template'}} -template <template <typename> > ; // expected-error {{expected 'class' before '>'}} -template <template <typename> Foo> ; // expected-error {{expected 'class' before 'Foo'}} +// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic. This is +// because ParseNonTypeTemplateParameter starts parsing a DeclSpec. +template < ; // expected-error {{parse error}} expected-error {{declaration does not declare anything}} +template <template X> struct Err1; // expected-error {{expected '<' after 'template'}} +template <template <typename> > struct Err2; // expected-error {{expected 'class' before '>'}} +template <template <typename> Foo> struct Err3; // expected-error {{expected 'class' before 'Foo'}} // Template function declarations template <typename T> void foo(); |