Skip to content

Commit f849821

Browse files
committed
Retain comments
1 parent c18c91f commit f849821

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/include/clang/AST/DeclContextInternals.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ class StoredDeclsList {
176176
DeclListNode::Decls *Tail = erase_if([Decls](NamedDecl *ND) {
177177
if (ND->isFromASTFile())
178178
return true;
179+
// FIXME: Can we get rid of this loop completely?
179180
return llvm::any_of(Decls, [ND](NamedDecl *D) {
181+
// Only replace the local declaration if the external declaration has
182+
// higher visiblities.
180183
return D->getModuleOwnershipKind() <= ND->getModuleOwnershipKind() &&
181184
D->declarationReplaces(ND, /*IsKnownNewer=*/false);
182185
});

0 commit comments

Comments
 (0)