We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c18c91f commit f849821Copy full SHA for f849821
clang/include/clang/AST/DeclContextInternals.h
@@ -176,7 +176,10 @@ class StoredDeclsList {
176
DeclListNode::Decls *Tail = erase_if([Decls](NamedDecl *ND) {
177
if (ND->isFromASTFile())
178
return true;
179
+ // FIXME: Can we get rid of this loop completely?
180
return llvm::any_of(Decls, [ND](NamedDecl *D) {
181
+ // Only replace the local declaration if the external declaration has
182
+ // higher visiblities.
183
return D->getModuleOwnershipKind() <= ND->getModuleOwnershipKind() &&
184
D->declarationReplaces(ND, /*IsKnownNewer=*/false);
185
});
0 commit comments