aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/friend.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/friend.cpp b/test/SemaCXX/friend.cpp
index edb0dd53fe..dc13570718 100644
--- a/test/SemaCXX/friend.cpp
+++ b/test/SemaCXX/friend.cpp
@@ -15,3 +15,17 @@ namespace test0 {
friend void ns::f(int a);
};
}
+
+// Test derived from LLVM's Registry.h
+namespace test1 {
+ template <class T> struct Outer {
+ void foo(T);
+ struct Inner {
+ friend void Outer::foo(T);
+ };
+ };
+
+ void test() {
+ (void) Outer<int>::Inner();
+ }
+}