Support local namespace aliases and permit them to be instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96335 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/namespace-alias.cpp b/test/SemaCXX/namespace-alias.cpp
index f983606..06114c3 100644
--- a/test/SemaCXX/namespace-alias.cpp
+++ b/test/SemaCXX/namespace-alias.cpp
@@ -62,3 +62,24 @@
     func();
   }
 }
+
+namespace K {
+  namespace KA { void func(); }
+
+  void f() {
+    namespace KB = KA;
+    KB::func();
+  }
+
+  template <class T> void g() {
+    namespace KC = KA;
+    KC::func();
+  }
+  template void g<int>();
+  template void g<long>();
+
+  void h() {
+    KB::func(); // expected-error {{undeclared identifier 'KB'}}
+    KC::func(); // expected-error {{undeclared identifier 'KC'}}
+  }
+}