aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/friend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/friend.cpp')
-rw-r--r--test/SemaTemplate/friend.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaTemplate/friend.cpp b/test/SemaTemplate/friend.cpp
new file mode 100644
index 000000000000..27299523862e
--- /dev/null
+++ b/test/SemaTemplate/friend.cpp
@@ -0,0 +1,14 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+template<typename T> struct A {
+ struct B { };
+
+ friend struct B;
+};
+
+void f() {
+ A<int>::B b;
+}
+
+struct C0 {
+ friend struct A<int>;
+};