Skip to content

Commit c946548

Browse files
committed
use local variable for temporary loop
1 parent 521a8a5 commit c946548

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ matchCallArguments(SmallVectorImpl<AnyFunctionType::Param> &args,
493493
if (numClaimedArgs != numArgs) {
494494
// Find all of the named, unclaimed arguments.
495495
llvm::SmallVector<unsigned, 4> unclaimedNamedArgs;
496-
for (nextArgIdx = 0; skipClaimedArgs(), nextArgIdx != numArgs;
497-
++nextArgIdx) {
498-
if (!args[nextArgIdx].getLabel().empty())
499-
unclaimedNamedArgs.push_back(nextArgIdx);
496+
for (auto argIdx : indices(args)) {
497+
if (claimedArgs[argIdx]) continue;
498+
if (!args[argIdx].getLabel().empty())
499+
unclaimedNamedArgs.push_back(argIdx);
500500
}
501501

502502
if (!unclaimedNamedArgs.empty()) {

0 commit comments

Comments
 (0)