summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-03-16 19:51:19 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-03-16 19:51:19 +0000
commit9c6fde5ac9c4a696baaa637a7fb6d83fe91e1e09 (patch)
treedc953d02f7d1b0c56f381ee661e6f22fcdeb45bd /test/SemaCXX
parente052bda1f3f8b857fa02abeef7b97f66308225fd (diff)
Skip through transparent contexts when deciding where to add a friend function.
This fixes g++.dg/parse/friend5.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r--test/SemaCXX/friend.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/friend.cpp b/test/SemaCXX/friend.cpp
index b1ef220e53..c5b11eb5a3 100644
--- a/test/SemaCXX/friend.cpp
+++ b/test/SemaCXX/friend.cpp
@@ -130,3 +130,11 @@ namespace test6_3 {
v.f();
}
}
+
+namespace test7 {
+ extern "C" {
+ class X {
+ friend int f() { return 42; }
+ };
+ }
+}