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 ff09e5cCopy full SHA for ff09e5c
clang/include/clang/AST/DeclContextInternals.h
@@ -177,6 +177,8 @@ class StoredDeclsList {
177
if (ND->isFromASTFile())
178
return true;
179
return llvm::any_of(Decls, [ND](NamedDecl *D) {
180
+ // Only replace the local declaration if the external declaration has
181
+ // higher visiblities.
182
return D->getModuleOwnershipKind() <= ND->getModuleOwnershipKind() &&
183
D->declarationReplaces(ND, /*IsKnownNewer=*/false);
184
});
0 commit comments