]> granicus.if.org Git - clang/commitdiff
Add test for C++ [temp.friend]p8, which bans partial specializations from being friends
authorDouglas Gregor <dgregor@apple.com>
Tue, 21 Dec 2010 16:05:12 +0000 (16:05 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 21 Dec 2010 16:05:12 +0000 (16:05 +0000)
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 [new file with mode: 0644]

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 (file)
index 0000000..d0221a3
--- /dev/null
@@ -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}}
+};