diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaCXX/invalid-member-expr.cpp | 4 | ||||
| -rw-r--r-- | clang/test/SemaCXX/typo-correction.cpp | 11 | ||||
| -rw-r--r-- | clang/test/SemaTemplate/deduction-crash.cpp | 2 | ||||
| -rw-r--r-- | clang/test/SemaTemplate/explicit-instantiation.cpp | 2 | ||||
| -rw-r--r-- | clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp | 3 |
5 files changed, 11 insertions, 11 deletions
diff --git a/clang/test/SemaCXX/invalid-member-expr.cpp b/clang/test/SemaCXX/invalid-member-expr.cpp index 172be6b8266..fd50d328da6 100644 --- a/clang/test/SemaCXX/invalid-member-expr.cpp +++ b/clang/test/SemaCXX/invalid-member-expr.cpp @@ -53,9 +53,7 @@ namespace test3 { namespace rdar11293995 { struct Length { - explicit Length(PassRefPtr<CalculationValue>); // expected-error {{unknown type name}} \ - expected-error {{expected ')'}} \ - expected-note {{to match this '('}} + explicit Length(PassRefPtr<CalculationValue>); // expected-error {{no template named 'PassRefPtr}} expected-error {{undeclared identifier 'CalculationValue'}} }; struct LengthSize { diff --git a/clang/test/SemaCXX/typo-correction.cpp b/clang/test/SemaCXX/typo-correction.cpp index c59ee618f92..2d78f06c5d3 100644 --- a/clang/test/SemaCXX/typo-correction.cpp +++ b/clang/test/SemaCXX/typo-correction.cpp @@ -524,13 +524,16 @@ namespace shadowed_template { template <typename T> class Fizbin {}; // expected-note {{'::shadowed_template::Fizbin' declared here}} class Baz { int Fizbin(); - // TODO: Teach the parser to recover from the typo correction instead of - // continuing to treat the template name as an implicit-int declaration. - Fizbin<int> qux; // expected-error {{unknown type name 'Fizbin'; did you mean '::shadowed_template::Fizbin'?}} \ - // expected-error {{expected member name or ';' after declaration specifiers}} + Fizbin<int> qux; // expected-error {{no template named 'Fizbin'; did you mean '::shadowed_template::Fizbin'?}} }; } +namespace no_correct_template_id_to_non_template { + struct Frobnatz {}; // expected-note {{declared here}} + Frobnats fn; // expected-error {{unknown type name 'Frobnats'; did you mean 'Frobnatz'?}} + Frobnats<int> fni; // expected-error-re {{no template named 'Frobnats'{{$}}}} +} + namespace PR18852 { void func() { struct foo { diff --git a/clang/test/SemaTemplate/deduction-crash.cpp b/clang/test/SemaTemplate/deduction-crash.cpp index ff7421a910b..c94c9db94e0 100644 --- a/clang/test/SemaTemplate/deduction-crash.cpp +++ b/clang/test/SemaTemplate/deduction-crash.cpp @@ -2,7 +2,7 @@ // Note that the error count below doesn't matter. We just want to // make sure that the parser doesn't crash. -// CHECK: 16 errors +// CHECK: 17 errors // PR7511 template<a> diff --git a/clang/test/SemaTemplate/explicit-instantiation.cpp b/clang/test/SemaTemplate/explicit-instantiation.cpp index 010716dd142..42d9f4d332a 100644 --- a/clang/test/SemaTemplate/explicit-instantiation.cpp +++ b/clang/test/SemaTemplate/explicit-instantiation.cpp @@ -95,7 +95,7 @@ namespace PR7622 { struct basic_streambuf; template<typename,typename> - struct basic_streambuf{friend bob<>()}; // expected-error{{unknown type name 'bob'}} \ + struct basic_streambuf{friend bob<>()}; // expected-error{{no template named 'bob'}} \ // expected-error{{expected member name or ';' after declaration specifiers}} template struct basic_streambuf<int>; } diff --git a/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp b/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp index 6afc7091260..a41248ee1b8 100644 --- a/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp +++ b/clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp @@ -347,8 +347,7 @@ template <typename T> struct B : A<T> { }; template <typename T> struct C : A<T> { // Incorrect form. - NameFromBase<T> m; // expected-error {{unknown type name 'NameFromBase'}} - //expected-error@-1 {{expected member name or ';' after declaration specifiers}} + NameFromBase<T> m; // expected-error {{no template named 'NameFromBase'}} }; } |

