diff options
author | Kaelyn Uhrain <rikka@google.com> | 2013-07-02 23:47:35 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2013-07-02 23:47:35 +0000 |
commit | b18b0c0f16c63585f69d72bc0991c1c09c813220 (patch) | |
tree | d26a00c090aeb4f88a99b69b53ed10761164cd05 /clang/test/FixIt/typo-crash.cpp | |
parent | ac8062bb724136609f422be9c5a82d3514645011 (diff) | |
download | bcm5719-llvm-b18b0c0f16c63585f69d72bc0991c1c09c813220.tar.gz bcm5719-llvm-b18b0c0f16c63585f69d72bc0991c1c09c813220.zip |
Look for corrections in enclosing namespaces that require a global NestedNameSpecifier.
CorrectTypo will now see and consider those corrections that are effectively
shadowed by other declarations in a closer context when resolved via an
unqualified lookup. This involves adding any parent namespaces to the set of
namespaces as fully-qualified name specifiers, and also adding potential
corrections that passed name lookup but were rejected by the given
CorrectionCandidateCallback into the set of failed corrections that should be
tried with the set of namespace specifiers.
llvm-svn: 185486
Diffstat (limited to 'clang/test/FixIt/typo-crash.cpp')
-rw-r--r-- | clang/test/FixIt/typo-crash.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/FixIt/typo-crash.cpp b/clang/test/FixIt/typo-crash.cpp index c154e3baba4..0ff160e4482 100644 --- a/clang/test/FixIt/typo-crash.cpp +++ b/clang/test/FixIt/typo-crash.cpp @@ -19,11 +19,12 @@ namespace PR12297 { namespace B { typedef short T; - T global(); // expected-note {{'A::B::global' declared here}} + T global(); // expected-note {{'::PR12297::global' declared here}} } } using namespace A::B; - T A::global(); // expected-error {{out-of-line definition of 'global' does not match any declaration in namespace 'PR12297::A'; did you mean 'A::B::global'?}} + // FIXME: Adding '::PR12297::' is not needed as removing 'A::' is sufficient + T A::global(); // expected-error {{out-of-line definition of 'global' does not match any declaration in namespace 'PR12297::A'; did you mean '::PR12297::global'?}} } |