Skip to content

Commit ff09e5c

Browse files
committed
Retain comments
1 parent c18c91f commit ff09e5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/include/clang/AST/DeclContextInternals.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ class StoredDeclsList {
177177
if (ND->isFromASTFile())
178178
return true;
179179
return llvm::any_of(Decls, [ND](NamedDecl *D) {
180+
// Only replace the local declaration if the external declaration has
181+
// higher visiblities.
180182
return D->getModuleOwnershipKind() <= ND->getModuleOwnershipKind() &&
181183
D->declarationReplaces(ND, /*IsKnownNewer=*/false);
182184
});

0 commit comments

Comments
 (0)