Perform access control when template lookup finds a class template.
This is *really* hacky.
llvm-svn: 110997
diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp
index 90a1449..b0c3360 100644
--- a/clang/test/CXX/class.access/p4.cpp
+++ b/clang/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'}}
+}