diff options
author | Kaelyn Uhrain <rikka@google.com> | 2013-10-19 00:05:00 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2013-10-19 00:05:00 +0000 |
commit | 8aa8da85ca60f2c7d88c47a67a4252bd032d1eb9 (patch) | |
tree | 481dd4d4b8137bf847d34fcc4a42c9043aa01bce /clang/test/Parser | |
parent | f7b63e3e18601459d95849e6fbc776b718d12515 (diff) | |
download | bcm5719-llvm-8aa8da85ca60f2c7d88c47a67a4252bd032d1eb9.tar.gz bcm5719-llvm-8aa8da85ca60f2c7d88c47a67a4252bd032d1eb9.zip |
Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes.
Now that CorrectTypo knows how to correctly search classes for typo
correction candidates, there is no good reason to only replace an
existing CXXScopeSpecifier if it refers to a namespace. While the actual
enablement was a matter of changing a single comparison, the fallout
from enabling the functionality required a lot more code changes
(including my two previous commits).
llvm-svn: 193020
Diffstat (limited to 'clang/test/Parser')
-rw-r--r-- | clang/test/Parser/cxx-using-directive.cpp | 4 | ||||
-rw-r--r-- | clang/test/Parser/switch-recovery.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/Parser/cxx-using-directive.cpp b/clang/test/Parser/cxx-using-directive.cpp index 76dc22f1530..5efd991c8e7 100644 --- a/clang/test/Parser/cxx-using-directive.cpp +++ b/clang/test/Parser/cxx-using-directive.cpp @@ -4,7 +4,7 @@ class A {}; namespace B { namespace A {} // expected-note{{namespace '::B::A' defined here}} \ - // expected-note{{namespace 'B::A' defined here}} + // expected-note 2{{namespace 'B::A' defined here}} using namespace A ; } @@ -28,7 +28,7 @@ namespace D { using namespace ! ; // expected-error{{expected namespace name}} using namespace A ; // expected-error{{no namespace named 'A'; did you mean 'B::A'?}} -using namespace ::A // expected-error{{expected namespace name}} \ +using namespace ::A // expected-error{{no namespace named 'A' in the global namespace; did you mean 'B::A'?}} \ // expected-error{{expected ';' after namespace name}} B ; diff --git a/clang/test/Parser/switch-recovery.cpp b/clang/test/Parser/switch-recovery.cpp index 84ac0c899e5..63b580202af 100644 --- a/clang/test/Parser/switch-recovery.cpp +++ b/clang/test/Parser/switch-recovery.cpp @@ -95,7 +95,7 @@ int test8( foo x ) { } // Stress test to make sure Clang doesn't crash. -void test9(int x) { +void test9(int x) { // expected-note {{'x' declared here}} switch(x) { case 1: return; 2: case; // expected-error {{expected 'case' keyword before expression}} \ @@ -104,8 +104,8 @@ void test9(int x) { 7: :x; // expected-error {{expected 'case' keyword before expression}} \ expected-error {{expected expression}} 8:: x; // expected-error {{expected ';' after expression}} \ - expected-error {{no member named 'x' in the global namespace}} \ - expected-warning {{expression result unused}} + expected-error {{no member named 'x' in the global namespace; did you mean simply 'x'?}} \ + expected-warning 2 {{expression result unused}} 9:: :y; // expected-error {{expected ';' after expression}} \ expected-error {{expected unqualified-id}} \ expected-warning {{expression result unused}} |