When diagnosing an invalid out-of-line redeclaration, don't permit
typo correction to introduce a nested-name-specifier; we aren't
prepared to handle it here. Fixes PR12297 / <rdar://problem/11075219>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153445 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/FixIt/typo-crash.cpp b/test/FixIt/typo-crash.cpp
index 92d2037..2e6f34a 100644
--- a/test/FixIt/typo-crash.cpp
+++ b/test/FixIt/typo-crash.cpp
@@ -10,3 +10,20 @@
   // expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}} \
   // expected-error {{use of undeclared identifier 't'}}
  }
+
+// FIXME: It would be nice if we could get this correction right.
+namespace PR12297 {
+  namespace A {
+    typedef short   T;
+    
+    namespace B {
+      typedef short   T;
+        
+      T global();
+    }
+  }
+
+  using namespace A::B;
+
+  T A::global(); // expected-error{{out-of-line definition of 'global' does not match any declaration in namespace 'PR12297::A'}}
+}