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
diff --git a/clang/test/FixIt/typo-crash.cpp b/clang/test/FixIt/typo-crash.cpp
index c154e3b..0ff160e 100644
--- a/clang/test/FixIt/typo-crash.cpp
+++ b/clang/test/FixIt/typo-crash.cpp
@@ -19,11 +19,12 @@
     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'?}}
 }