summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitaf0cc7fd27117ec48c503d3e68bc10f3c5f8fce9 (patch)
tree6b5e577ffb44525fb2a73786f94539ab4a5965a9 /clang/lib
parent7bfe2b5a4aed4e542e9553efaa47c643688e026c (diff)
downloadbcm5719-llvm-af0cc7fd27117ec48c503d3e68bc10f3c5f8fce9.tar.gz
bcm5719-llvm-af0cc7fd27117ec48c503d3e68bc10f3c5f8fce9.zip
Skip through transparent contexts when deciding where to add a friend function.
This fixes g++.dg/parse/friend5.C. llvm-svn: 152938
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 79a5d4c98c5..c8c3af3cd54 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -10060,7 +10060,7 @@ Decl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D,
// 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);
OpenPOWER on IntegriCloud