summaryrefslogtreecommitdiff
path: root/test/Parser/cxx-template-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx-template-decl.cpp')
-rw-r--r--test/Parser/cxx-template-decl.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp
index 695501879098..9309b72a556e 100644
--- a/test/Parser/cxx-template-decl.cpp
+++ b/test/Parser/cxx-template-decl.cpp
@@ -2,16 +2,17 @@
// Errors
export class foo { }; // expected-error {{expected template}}
-template x; // expected-error {{C++ requires a type specifier for all declarations}}
-export template x; // expected-error {{expected '<' after 'template'}} \
- // expected-note {{exported templates are unsupported}} \
-// expected-error {{C++ requires a type specifier for all declarations}}
-// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic. This is
-// because ParseNonTypeTemplateParameter starts parsing a DeclSpec.
+template x; // expected-error {{C++ requires a type specifier for all declarations}} \
+ // expected-error {{does not refer}}
+export template x; // expected-error {{expected '<' after 'template'}}
+export template<class T> class x0; // expected-note {{exported templates are unsupported}}
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 <template X> struct Err1; // expected-error {{expected '<' after 'template'}} \
+// expected-error{{extraneous}}
+template <template <typename> > struct Err2; // expected-error {{expected 'class' before '>'}} \
+// expected-error{{extraneous}}
+template <template <typename> Foo> struct Err3; // expected-error {{expected 'class' before 'Foo'}} \
+// expected-error{{extraneous}}
// Template function declarations
template <typename T> void foo();
@@ -53,7 +54,7 @@ template <typename T, typename U> struct B { };
// Template parameter shadowing
template<typename T, // expected-note{{template parameter is declared here}}
- typename T> // expected-error{{declaration of 'T' shadows template parameter}}
+ typename T> // expected-error{{declaration of 'T' shadows template parameter}}
void shadow1();
template<typename T> // expected-note{{template parameter is declared here}}