summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-07-12 20:38:49 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-07-12 20:38:49 +0000
commit141942fcca5e7da4a582192c8bc81c9ccbd84784 (patch)
tree07b6d1b5494188f232716e0c9f680a475cc48130 /clang/lib/Sema/SemaTemplate.cpp
parent023e65611deff2b536fe6a0801b5dbcd11907e8d (diff)
downloadbcm5719-llvm-141942fcca5e7da4a582192c8bc81c9ccbd84784.tar.gz
bcm5719-llvm-141942fcca5e7da4a582192c8bc81c9ccbd84784.zip
Unrevert r186040, reverted in r186185, with fix for PR16597.
Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186199
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index e6006b6bf97..6f1ab19f10e 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -1120,8 +1120,7 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK,
NewClass->setAccess(PrevClassTemplate->getAccess());
}
- NewTemplate->setObjectOfFriendDecl(/* PreviouslyDeclared = */
- PrevClassTemplate != NULL);
+ NewTemplate->setObjectOfFriendDecl();
// Friend templates are visible in fairly strange ways.
if (!CurContext->isDependentContext()) {
OpenPOWER on IntegriCloud