Skip to content

Commit dfd8af1

Browse files
committed
use for-in
1 parent ed4d837 commit dfd8af1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ matchCallArguments(SmallVectorImpl<AnyFunctionType::Param> &args,
258258
actualArgNames.resize(numArgs);
259259

260260
// Figure out previous argument names from the parameter bindings.
261-
for (unsigned i = 0; i != numParams; ++i) {
261+
for (auto i : indices(params)) {
262262
const auto &param = params[i];
263263
bool firstArg = true;
264264

@@ -526,7 +526,7 @@ matchCallArguments(SmallVectorImpl<AnyFunctionType::Param> &args,
526526
// Find the closest matching unfulfilled named parameter.
527527
unsigned bestScore = 0;
528528
unsigned best = 0;
529-
for (unsigned i = 0, n = unfulfilledNamedParams.size(); i != n; ++i) {
529+
for (auto i : indices(unfulfilledNamedParams)) {
530530
unsigned param = unfulfilledNamedParams[i];
531531
auto paramName = params[param].getLabel();
532532

@@ -583,7 +583,7 @@ matchCallArguments(SmallVectorImpl<AnyFunctionType::Param> &args,
583583
// labels don't line up, if so let's try to claim arguments
584584
// with incorrect labels, and let OoO/re-labeling logic diagnose that.
585585
if (numArgs == numParams && numClaimedArgs != numArgs) {
586-
for (unsigned i = 0; i < numArgs; ++i) {
586+
for (auto i : indices(args)) {
587587
if (claimedArgs[i] || !parameterBindings[i].empty())
588588
continue;
589589

0 commit comments

Comments
 (0)