diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-10 22:04:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-10 22:04:13 +0000 |
commit | 7a73449b318225963dd9ceb4f75afe242ff21984 (patch) | |
tree | e2a4d93e10cd1b5df155cb3506ef7ae62b43b56c /clang/lib/Sema/SemaTemplate.cpp | |
parent | bc68b431ba7c903f422d645ff08c146254a8f3d2 (diff) | |
download | bcm5719-llvm-7a73449b318225963dd9ceb4f75afe242ff21984.tar.gz bcm5719-llvm-7a73449b318225963dd9ceb4f75afe242ff21984.zip |
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: 186040
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 3 |
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()) { |