Perform access control when template lookup finds a class template.
This is *really* hacky.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110997 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/class.access/p4.cpp b/test/CXX/class.access/p4.cpp
index 90a1449..b0c3360 100644
--- a/test/CXX/class.access/p4.cpp
+++ b/test/CXX/class.access/p4.cpp
@@ -427,3 +427,12 @@
   void b() { throw A(); } // expected-error{{temporary of type 'test16::A' has private destructor}} \
   // expected-error{{exception object of type 'test16::A' has private destructor}}
 }
+
+// rdar://problem/8146294
+namespace test17 {
+  class A {
+    template <typename T> class Inner { }; // expected-note {{declared private here}}
+  };
+
+  A::Inner<int> s; // expected-error {{'Inner' is a private member of 'test17::A'}}
+}