aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/typo-correction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/typo-correction.cpp')
-rw-r--r--test/SemaCXX/typo-correction.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/SemaCXX/typo-correction.cpp b/test/SemaCXX/typo-correction.cpp
index c59ee618f929..2d78f06c5d33 100644
--- a/test/SemaCXX/typo-correction.cpp
+++ b/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 {