diff options
| author | Kaelyn Uhrain <rikka@google.com> | 2012-06-15 23:45:58 +0000 |
|---|---|---|
| committer | Kaelyn Uhrain <rikka@google.com> | 2012-06-15 23:45:58 +0000 |
| commit | b5b17fe9fc5ea8aadefc590fefe63ec178150896 (patch) | |
| tree | e2b1bc0df3fb526e2eebffbb6b05daacfbe237bb /clang/test/Parser | |
| parent | 237c7d33b93113330eb33161da2cd29e8c631f44 (diff) | |
| download | bcm5719-llvm-b5b17fe9fc5ea8aadefc590fefe63ec178150896.tar.gz bcm5719-llvm-b5b17fe9fc5ea8aadefc590fefe63ec178150896.zip | |
Recover when correcting an unknown type name to a keyword like "struct".
llvm-svn: 158573
Diffstat (limited to 'clang/test/Parser')
| -rw-r--r-- | clang/test/Parser/recovery.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Parser/recovery.cpp b/clang/test/Parser/recovery.cpp index ffa1bab55a4..ff687583c25 100644 --- a/clang/test/Parser/recovery.cpp +++ b/clang/test/Parser/recovery.cpp @@ -12,13 +12,12 @@ inline namespace Std { // expected-error {{cannot be reopened as inline}} int x; Std::Important y; -// FIXME: Recover as if the typo correction were applied. -extenr "C" { // expected-error {{did you mean 'extern'}} expected-error {{unqualified-id}} +extenr "C" { // expected-error {{did you mean the keyword 'extern'}} void f(); } void g() { z = 1; // expected-error {{undeclared}} - f(); // expected-error {{undeclared}} + f(); } struct S { @@ -37,6 +36,7 @@ namespace N { int } // expected-error {{unqualified-id}} -// FIXME: Recover as if the typo correction were applied. -strcut U { // expected-error {{did you mean 'struct'}} -} *u[3]; // expected-error {{expected ';'}} +strcut Uuuu { // expected-error {{did you mean the keyword 'struct'}} \ + // expected-note {{'Uuuu' declared here}} +} *u[3]; +uuuu v; // expected-error {{did you mean 'Uuuu'}} |

