Improve typo correction involving nested name specifiers.
Snooping in other namespaces when the identifier being corrected is
already qualified (i.e. a valid CXXScopeSpec is passed to CorrectTypo)
and ranking synthesized namespace qualifiers relative to the existing
qualifier is now performed. Support for disambiguating the string
representation of synthesized namespace qualifers has also been added
(the change to test/Parser/cxx-using-directive.cpp is an example of an
ambiguous relative qualifier).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150622 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-using-directive.cpp b/test/Parser/cxx-using-directive.cpp
index 1e91899..1d781fb 100644
--- a/test/Parser/cxx-using-directive.cpp
+++ b/test/Parser/cxx-using-directive.cpp
@@ -3,7 +3,7 @@
class A {};
namespace B {
- namespace A {}
+ namespace A {} // expected-note{{namespace '::B::A' defined here}}
using namespace A ;
}
@@ -19,8 +19,7 @@
namespace B {}
using namespace C ;
- using namespace B::A ; // expected-error{{expected namespace name}}
- //FIXME: would be nice to note, that A is not member of D::B
+ 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::C ; // expected-error{{expected namespace name}}
}
@@ -37,4 +36,3 @@
using namespace B;
using namespace C;
}
-