This fixes g++.dg/parse/friend5.C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152938
91177308-0d34-0410-b5e6-
96231b3b80d8
// declarations should stop at the nearest enclosing namespace,
// not that they should only consider the nearest enclosing
// namespace.
- while (DC->isRecord())
+ while (DC->isRecord() || DC->isTransparentContext())
DC = DC->getParent();
LookupQualifiedName(Previous, DC);
v.f();
}
}
+
+namespace test7 {
+ extern "C" {
+ class X {
+ friend int f() { return 42; }
+ };
+ }
+}