summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-using-directive.cpp
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2013-07-02 23:47:44 +0000
committerKaelyn Uhrain <rikka@google.com>2013-07-02 23:47:44 +0000
commit10413a46a0d8abe7d6a14e99ce582dac0ad069e8 (patch)
tree035345bb35cb1d0e02290c611e2188d0629e3e10 /clang/test/Parser/cxx-using-directive.cpp
parentb18b0c0f16c63585f69d72bc0991c1c09c813220 (diff)
downloadbcm5719-llvm-10413a46a0d8abe7d6a14e99ce582dac0ad069e8.tar.gz
bcm5719-llvm-10413a46a0d8abe7d6a14e99ce582dac0ad069e8.zip
Allow typo correction to try removing nested name specifiers.
The removal is tried by retrying the failed lookup of a correction candidate with either the MemberContext or SS (CXXScopeSpecifier) or both set to NULL if they weren't already. If the candidate identifier is then looked up successfully, make a note in the candidate that the SourceRange should include any existing nested name specifier even if the candidate isn't adding a different one (i.e. the candidate has a NULL NestedNameSpecifier). Also tweak the diagnostic messages to differentiate between a suggestion that just replaces the identifer but leaves the existing nested name specifier intact and one that replaces the entire qualified identifier, in cases where the suggested replacement is unqualified. llvm-svn: 185487
Diffstat (limited to 'clang/test/Parser/cxx-using-directive.cpp')
-rw-r--r--clang/test/Parser/cxx-using-directive.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx-using-directive.cpp b/clang/test/Parser/cxx-using-directive.cpp
index 1b8f495b70e..76dc22f1530 100644
--- a/clang/test/Parser/cxx-using-directive.cpp
+++ b/clang/test/Parser/cxx-using-directive.cpp
@@ -8,7 +8,7 @@ namespace B {
using namespace A ;
}
-namespace C {} // expected-note{{namespace '::C' defined here}}
+namespace C {} // expected-note{{namespace 'C' defined here}}
namespace D {
@@ -23,7 +23,7 @@ namespace D {
using namespace B::A ; // expected-error{{no namespace named 'A' in namespace 'D::B'; did you mean '::B::A'?}}
using namespace ::B::A ;
using namespace ::D::F ; // expected-error{{expected namespace name}}
- using namespace ::D::C ; // expected-error{{no namespace named 'C' in namespace 'D'; did you mean '::C'?}}
+ using namespace ::D::C ; // expected-error{{no namespace named 'C' in namespace 'D'; did you mean simply 'C'?}}
}
using namespace ! ; // expected-error{{expected namespace name}}
OpenPOWER on IntegriCloud