summaryrefslogtreecommitdiffstats
path: root/test/CXX/class.access/class.friend/p3-cxx0x.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
committerdim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
commitc72c57c9e9b69944e3e009cd5e209634839581d3 (patch)
tree4fc2f184c499d106f29a386c452b49e5197bf63d /test/CXX/class.access/class.friend/p3-cxx0x.cpp
parent5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff)
downloadFreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip
FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/CXX/class.access/class.friend/p3-cxx0x.cpp')
-rw-r--r--test/CXX/class.access/class.friend/p3-cxx0x.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CXX/class.access/class.friend/p3-cxx0x.cpp b/test/CXX/class.access/class.friend/p3-cxx0x.cpp
index e4d5fd5..ea9d2ce 100644
--- a/test/CXX/class.access/class.friend/p3-cxx0x.cpp
+++ b/test/CXX/class.access/class.friend/p3-cxx0x.cpp
@@ -28,14 +28,19 @@ X1<Y2> x1a;
X1<Y3> x1b;
X1<Y1> x1c; // expected-note{{in instantiation of template class 'X1<Y1>' requested here}}
+template<typename T> class B;
+
template<typename T>
class A {
T x;
public:
class foo {};
static int y;
+ template <typename S> friend class B<S>::ty;
};
+template <typename T> class B { typedef int ty; };
+
struct {
// Ill-formed
int friend; // expected-error {{'friend' must appear first in a non-function declaration}}
@@ -53,3 +58,5 @@ struct {
float;
template<typename T> friend class A<T>::foo;
} a;
+
+void testA() { (void)sizeof(A<int>); }
OpenPOWER on IntegriCloud