summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/friend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/friend.cpp')
-rw-r--r--test/SemaCXX/friend.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/friend.cpp b/test/SemaCXX/friend.cpp
index 76e84e5..d1c42eb 100644
--- a/test/SemaCXX/friend.cpp
+++ b/test/SemaCXX/friend.cpp
@@ -4,3 +4,14 @@ friend class A; // expected-error {{'friend' used outside of class}}
void f() { friend class A; } // expected-error {{'friend' used outside of class}}
class C { friend class A; };
class D { void f() { friend class A; } }; // expected-error {{'friend' used outside of class}}
+
+// PR5760
+namespace test0 {
+ namespace ns {
+ void f(int);
+ }
+
+ struct A {
+ friend void ns::f(int a);
+ };
+}
OpenPOWER on IntegriCloud