diff options
author | Kaelyn Uhrain <rikka@google.com> | 2012-02-15 22:14:18 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2012-02-15 22:14:18 +0000 |
commit | 2d4d7fd0ca37b61406dfe58acbefa8cf20ee050a (patch) | |
tree | 46b2df60aa47c567592906491603f7e7df29e534 /test/Parser/cxx-using-directive.cpp | |
parent | c2956e5681113bbcec5ff98833345166942a211b (diff) |
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
Diffstat (limited to 'test/Parser/cxx-using-directive.cpp')
-rw-r--r-- | test/Parser/cxx-using-directive.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/Parser/cxx-using-directive.cpp b/test/Parser/cxx-using-directive.cpp index 1e918996d1..1d781fbdcf 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 D { 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 @@ void test_nslookup() { using namespace B; using namespace C; } - |