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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186040 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/Decl.h 6 additions, 0 deletionsinclude/clang/AST/Decl.h
- include/clang/AST/DeclBase.h 10 additions, 3 deletionsinclude/clang/AST/DeclBase.h
- lib/Sema/SemaDecl.cpp 4 additions, 8 deletionslib/Sema/SemaDecl.cpp
- lib/Sema/SemaLookup.cpp 9 additions, 2 deletionslib/Sema/SemaLookup.cpp
- lib/Sema/SemaTemplate.cpp 1 addition, 2 deletionslib/Sema/SemaTemplate.cpp
- lib/Sema/SemaTemplateInstantiateDecl.cpp 7 additions, 13 deletionslib/Sema/SemaTemplateInstantiateDecl.cpp
- test/CXX/temp/temp.decls/temp.friend/p4.cpp 17 additions, 0 deletionstest/CXX/temp/temp.decls/temp.friend/p4.cpp
- test/SemaCXX/friend.cpp 12 additions, 0 deletionstest/SemaCXX/friend.cpp
Loading
Please register or sign in to comment