From: Douglas Gregor Date: Tue, 21 Dec 2010 16:05:12 +0000 (+0000) Subject: Add test for C++ [temp.friend]p8, which bans partial specializations from being friends X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55dc95b69846fde1c41aff7e2f3fcfed5d6fc5ab;p=clang Add test for C++ [temp.friend]p8, which bans partial specializations from being friends git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122335 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/temp/temp.decls/temp.friend/p8.cpp b/test/CXX/temp/temp.decls/temp.friend/p8.cpp new file mode 100644 index 0000000000..d0221a3668 --- /dev/null +++ b/test/CXX/temp/temp.decls/temp.friend/p8.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +template class A { }; + +class X { + template friend class A; // expected-error{{partial specialization cannot be declared as a friend}} +};