diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-10-08 15:14:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-10-08 15:14:33 +0000 |
commit | bbe8f466211771b1a96b1eede898f9380b14dd6f (patch) | |
tree | f122ca444fc6ea0ecb3f895eacb214c3a342bff4 /clang/test/Parser | |
parent | 86d142a80113e9e1d11996f7d5bd9baecfd5a69f (diff) | |
download | bcm5719-llvm-bbe8f466211771b1a96b1eede898f9380b14dd6f.tar.gz bcm5719-llvm-bbe8f466211771b1a96b1eede898f9380b14dd6f.zip |
Improve checking for specializations of member classes of class
templates, and keep track of how those member classes were
instantiated or specialized.
Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.
llvm-svn: 83547
Diffstat (limited to 'clang/test/Parser')
-rw-r--r-- | clang/test/Parser/cxx-template-decl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/Parser/cxx-template-decl.cpp b/clang/test/Parser/cxx-template-decl.cpp index 7f1ff3dc316..9309b72a556 100644 --- a/clang/test/Parser/cxx-template-decl.cpp +++ b/clang/test/Parser/cxx-template-decl.cpp @@ -7,9 +7,12 @@ template x; // expected-error {{C++ requires a type specifier for al 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(); |