================ @@ -176,14 +176,10 @@ class StoredDeclsList { DeclListNode::Decls *Tail = erase_if([Decls](NamedDecl *ND) { if (ND->isFromASTFile()) return true; - // FIXME: Can we get rid of this loop completely? - for (NamedDecl *D : Decls) - // Only replace the local declaration if the external declaration has - // higher visibilities. - if (D->getModuleOwnershipKind() <= ND->getModuleOwnershipKind() && - D->declarationReplaces(ND, /*IsKnownNewer=*/false)) - return true; - return false; + return llvm::any_of(Decls, [ND](NamedDecl *D) { ---------------- ChuanqiXu9 wrote:
Please remain the comments. https://github.com/llvm/llvm-project/pull/143275 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits