summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/friend-template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate/friend-template.cpp')
-rw-r--r--clang/test/SemaTemplate/friend-template.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/friend-template.cpp b/clang/test/SemaTemplate/friend-template.cpp
index 9a483aeb5b1..761c13076d2 100644
--- a/clang/test/SemaTemplate/friend-template.cpp
+++ b/clang/test/SemaTemplate/friend-template.cpp
@@ -44,3 +44,21 @@ template<>
struct X0<int> {
template<typename U> friend struct X0;
};
+
+template<typename T>
+struct X1 {
+ template<typename U> friend void f2(U);
+ template<typename U> friend void f3(U);
+};
+
+template<typename U> void f2(U);
+
+X1<int> x1i;
+
+template<> void f2(int);
+
+// FIXME: Should this declaration of f3 be required for the specialization of
+// f3<int> (further below) to work? GCC and EDG don't require it, we do...
+template<typename U> void f3(U);
+
+template<> void f3(int);
OpenPOWER on IntegriCloud