[PATCH] D135370: Narrow inline namespace filtration for unqualified friend declarations
Troy Johnson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 07:32:48 PDT 2022
troyj updated this revision to Diff 466072.
troyj added a comment.
Added more diff context as requested.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135370/new/
https://reviews.llvm.org/D135370
Files:
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
Index: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
===================================================================
--- clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -2273,9 +2273,11 @@
// Filter out previous declarations that don't match the scope. The only
// effect this has is to remove declarations found in inline namespaces
// for friend declarations with unqualified names.
- SemaRef.FilterLookupForScope(Previous, DC, /*Scope*/ nullptr,
- /*ConsiderLinkage*/ true,
- QualifierLoc.hasQualifier());
+ if (isFriend && !QualifierLoc && !FunctionTemplate) {
+ SemaRef.FilterLookupForScope(Previous, DC, /*Scope=*/ nullptr,
+ /*ConsiderLinkage=*/ true,
+ QualifierLoc.hasQualifier());
+ }
}
// Per [temp.inst], default arguments in function declarations at local scope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135370.466072.patch
Type: text/x-patch
Size: 1002 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221007/90ccd5f0/attachment.bin>
More information about the cfe-commits
mailing list