From 2c2eb12d9c895b2174788f5068f106e5e933bbfc Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 16 Oct 2010 06:59:13 +0000 Subject: White-listing templated-scope friend decls is a good idea, but doing it by marking the decl invalid isn't. Make some steps towards supporting these and then hastily shut them down at the last second by marking them as unsupported. llvm-svn: 116661 --- clang/test/CodeGenCXX/template-instantiation.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'clang/test') diff --git a/clang/test/CodeGenCXX/template-instantiation.cpp b/clang/test/CodeGenCXX/template-instantiation.cpp index 47ff16b8a62..a8729035e28 100644 --- a/clang/test/CodeGenCXX/template-instantiation.cpp +++ b/clang/test/CodeGenCXX/template-instantiation.cpp @@ -92,3 +92,20 @@ namespace test3 { // don't have key functions. template void S::m(); } + +namespace test4 { + template struct A { static void foo(); }; + + class B { + template friend void A::foo(); + B(); + }; + + template void A::foo() { + B b; + } + + unsigned test() { + A::foo(); + } +} -- cgit v1.2.3