Set up the semantic context correctly when declaring a friend class template.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91678 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/friend-template.cpp b/test/SemaTemplate/friend-template.cpp
index 9bc3d76..05289b1 100644
--- a/test/SemaTemplate/friend-template.cpp
+++ b/test/SemaTemplate/friend-template.cpp
@@ -97,3 +97,13 @@
     f(A<int>()); // expected-note {{in instantiation of function template specialization}}
   }
 }
+
+namespace test5 {
+  class outer {
+    class foo;
+    template <typename T> friend struct cache;
+  };
+  class outer::foo {
+    template <typename T> friend struct cache;
+  };
+}