summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Parser/cxx-friend.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-friend.cpp b/clang/test/Parser/cxx-friend.cpp
index 5bfaf2fdbce..ea30ddcbd0a 100644
--- a/clang/test/Parser/cxx-friend.cpp
+++ b/clang/test/Parser/cxx-friend.cpp
@@ -3,3 +3,15 @@
class C {
friend class D;
};
+
+class A {
+public:
+ void f();
+};
+
+class B {
+ // 'A' here should refer to the declaration above.
+ friend class A;
+
+ void f(A *a) { a->f(); }
+};
OpenPOWER on IntegriCloud