diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-21 16:05:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-21 16:05:12 +0000 |
commit | 55dc95b69846fde1c41aff7e2f3fcfed5d6fc5ab (patch) | |
tree | 1a7296570d868289a5e3f51c325e8990c1526c34 | |
parent | b0ee93cf945744569b82b8a07361061f2963264a (diff) |
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
-rw-r--r-- | test/CXX/temp/temp.decls/temp.friend/p8.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 T> class A { }; + +class X { + template<class T> friend class A<T*>; // expected-error{{partial specialization cannot be declared as a friend}} +}; |