Skip to content

Commit b872bdf

Browse files
committed
[Diagnostics] Replace llvm::find_if with llvm::any_of in diagnoseAmbiguityWithFixes
1 parent 60a210b commit b872bdf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2973,9 +2973,10 @@ bool ConstraintSystem::diagnoseAmbiguityWithFixes(
29732973
commonCalleeLocator);
29742974
return true;
29752975
} else {
2976-
bool isApplication = llvm::find_if(ArgumentInfos, [&](const auto argInfo) {
2977-
return argInfo.first->getAnchor() == commonAnchor;
2978-
}) != ArgumentInfos.end();
2976+
bool isApplication =
2977+
llvm::any_of(ArgumentInfos, [&](const auto &argInfo) {
2978+
return argInfo.first->getAnchor() == commonAnchor;
2979+
});
29792980

29802981
DE.diagnose(commonAnchor->getLoc(),
29812982
diag::no_overloads_match_exactly_in_call,

0 commit comments

Comments
 (0)