From 55dc95b69846fde1c41aff7e2f3fcfed5d6fc5ab Mon Sep 17 00:00:00 2001
From: Douglas Gregor <dgregor@apple.com>
Date: Tue, 21 Dec 2010 16:05:12 +0000
Subject: [PATCH] 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
---
 test/CXX/temp/temp.decls/temp.friend/p8.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 test/CXX/temp/temp.decls/temp.friend/p8.cpp

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 00000000000..d0221a3668d
--- /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 T> class A { }; 
+
+class X {
+  template<class T> friend class A<T*>; // expected-error{{partial specialization cannot be declared as a friend}}
+};
-- 
GitLab