Skip to content

Commit dd6f577

Browse files
committed
[ConstraintSystem] Use llvm::all_of.
1 parent 948ee3c commit dd6f577

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,11 +1512,9 @@ static bool havePotentialTypesOrLiteralConformances(Type ty,
15121512
// in the given function type.
15131513
static bool haveTypeInformationForAllArguments(AnyFunctionType *fnType,
15141514
ConstraintSystem &cs) {
1515-
for (auto param : fnType->getParams())
1516-
if (!havePotentialTypesOrLiteralConformances(param.getType(), cs))
1517-
return false;
1518-
1519-
return true;
1515+
return llvm::all_of(fnType->getParams(), [&](AnyFunctionType::Param param) {
1516+
return havePotentialTypesOrLiteralConformances(param.getType(), cs);
1517+
});
15201518
}
15211519

15221520
// Given a type variable representing the RHS of an ApplicableFunction

0 commit comments

Comments
 (0)