diff options
author | John McCall <rjmccall@apple.com> | 2010-02-26 08:45:28 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-26 08:45:28 +0000 |
commit | 1f476a1783d95d9b53b10f763789e8afeded42f3 (patch) | |
tree | ef4171febd99b0f182fd41f0569b0f83d1b006bc /clang/test/SemaTemplate | |
parent | 663f658d87961061a191611ce4a8ec3f32df296f (diff) | |
download | bcm5719-llvm-1f476a1783d95d9b53b10f763789e8afeded42f3.tar.gz bcm5719-llvm-1f476a1783d95d9b53b10f763789e8afeded42f3.zip |
Fix an assertion-on-error during tentative constructor parsing by
propagating error conditions out of the various annotate-me-a-snowflake
routines. Generally (but not universally) removes redundant diagnostics
as well as, you know, not crashing on bad code. On the other hand,
I have just signed myself up to fix fiddly parser errors for the next
week. Again.
llvm-svn: 97221
Diffstat (limited to 'clang/test/SemaTemplate')
4 files changed, 8 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/dependent-base-classes.cpp b/clang/test/SemaTemplate/dependent-base-classes.cpp index 80d20b09b82..cd90f634106 100644 --- a/clang/test/SemaTemplate/dependent-base-classes.cpp +++ b/clang/test/SemaTemplate/dependent-base-classes.cpp @@ -57,7 +57,6 @@ namespace PR6031 { int foo() { class NoDepBase::Nested nested; // expected-error{{'Nested' does not name a tag member in the specified scope}} typedef typename NoDepBase::template MemberTemplate<T>::type type; // expected-error{{'MemberTemplate' following the 'template' keyword does not refer to a template}} \ - // FIXME: expected-error{{expected an identifier or template-id after '::'}} \ // FIXME: expected-error{{unqualified-id}} return NoDepBase::a; // expected-error{{no member named 'a' in 'struct PR6031::NoDepBase'}} } diff --git a/clang/test/SemaTemplate/explicit-specialization-member.cpp b/clang/test/SemaTemplate/explicit-specialization-member.cpp index 417cdc1f198..cb0a39a9d0c 100644 --- a/clang/test/SemaTemplate/explicit-specialization-member.cpp +++ b/clang/test/SemaTemplate/explicit-specialization-member.cpp @@ -16,7 +16,7 @@ namespace PR6161 { // expected-error{{expected class name}} \ // expected-note{{attempt to specialize declaration here}} { - static locale::id id; // expected-error{{use of undeclared identifier}} + static locale::id id; // expected-error{{use of undeclared identifier}} FIXME: expected-error {{unknown type name}} }; numpunct<char>::~numpunct(); // expected-error{{template specialization requires 'template<>'}} \ // expected-error{{specialization of member 'PR6161::numpunct<char>::~numpunct' does not specialize an instantiated member}} diff --git a/clang/test/SemaTemplate/nested-name-spec-template.cpp b/clang/test/SemaTemplate/nested-name-spec-template.cpp index 704b8cfce12..1691db74a11 100644 --- a/clang/test/SemaTemplate/nested-name-spec-template.cpp +++ b/clang/test/SemaTemplate/nested-name-spec-template.cpp @@ -49,6 +49,5 @@ struct ::N::A<int>::X { template<typename T> struct TestA { typedef typename N::template B<T>::type type; // expected-error{{'B' following the 'template' keyword does not refer to a template}} \ - // expected-error{{identifier or template-id}} \ // expected-error{{expected member name}} }; diff --git a/clang/test/SemaTemplate/temp_arg.cpp b/clang/test/SemaTemplate/temp_arg.cpp index 3c9fcb50661..80bbda785d0 100644 --- a/clang/test/SemaTemplate/temp_arg.cpp +++ b/clang/test/SemaTemplate/temp_arg.cpp @@ -10,3 +10,10 @@ A<int, 0, X> * a1; A<float, 1, X, double> *a2; // expected-error{{too many template arguments for class template 'A'}} A<float, 1> *a3; // expected-error{{too few template arguments for class template 'A'}} + +namespace test0 { + template <class t> class foo {}; + template <class t> class bar { + bar(::test0::foo<tee> *ptr) {} // FIXME(redundant): expected-error 2 {{use of undeclared identifier 'tee'}} + }; +} |