File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -176,14 +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?
180- for (NamedDecl *D : Decls)
181- // Only replace the local declaration if the external declaration has
182- // higher visibilities.
183- if (D->getModuleOwnershipKind () <= ND->getModuleOwnershipKind () &&
184- D->declarationReplaces (ND, /* IsKnownNewer=*/ false ))
185- return true ;
186- return false ;
179+ return llvm::any_of (Decls, [ND](NamedDecl *D) {
180+ return D->getModuleOwnershipKind () <= ND->getModuleOwnershipKind () &&
181+ D->declarationReplaces (ND, /* IsKnownNewer=*/ false );
182+ });
187183 });
188184
189185 // Don't have any pending external decls any more.
You can’t perform that action at this time.
0 commit comments