diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-07-12 18:54:40 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-07-12 18:54:40 +0000 |
commit | 9bdd1bb40317bd3545817634c4d06e1b27feecae (patch) | |
tree | c7e70da9b856d4bd1b1cfeaa05661146a155adbe /clang/lib/Sema/SemaTemplate.cpp | |
parent | 5f1ef3c8aafb137595531b2808c2e2382d1b5fa1 (diff) | |
download | bcm5719-llvm-9bdd1bb40317bd3545817634c4d06e1b27feecae.tar.gz bcm5719-llvm-9bdd1bb40317bd3545817634c4d06e1b27feecae.zip |
Revert r186040 to fix PR16597 while Richard investigates what the best
fix is.
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: 186185
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 6f1ab19f10e..e6006b6bf97 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -1120,7 +1120,8 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, NewClass->setAccess(PrevClassTemplate->getAccess()); } - NewTemplate->setObjectOfFriendDecl(); + NewTemplate->setObjectOfFriendDecl(/* PreviouslyDeclared = */ + PrevClassTemplate != NULL); // Friend templates are visible in fairly strange ways. if (!CurContext->isDependentContext()) { |