summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-07-17 23:53:16 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-07-17 23:53:16 +0000
commit6401768ac4565a43dbe09e096360be8594ad30e7 (patch)
tree9eaa75c75e61d3d23a262b22a8c356ddc80eeb48 /clang/lib/Sema/SemaTemplate.cpp
parentf05d6c784373c30740eda1fb0f1ce5e6790e7f35 (diff)
downloadbcm5719-llvm-6401768ac4565a43dbe09e096360be8594ad30e7.tar.gz
bcm5719-llvm-6401768ac4565a43dbe09e096360be8594ad30e7.zip
Reinstate r186040, with additional fixes and more test coverage (reverted in
r186331). 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: 186546
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