Skip to content

Commit c0fe2b8

Browse files
committed
Apply clang-tidy fixes for modernize-loop-convert in Transforms.cpp (NFC)
1 parent a0a1688 commit c0fe2b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,21 +482,21 @@ FailureOr<LowerUnPackOpResult> linalg::lowerUnPack(RewriterBase &rewriter,
482482
SmallVector<int64_t>
483483
PackedOperandsDimList::extractPackedDimsForOperand(int64_t operandPos) {
484484
SmallVector<int64_t> res;
485-
for (int64_t i = 0, e = spec.size(); i < e; ++i) {
486-
if (!spec[i].packedDimForEachOperand[operandPos].has_value())
485+
for (auto &i : spec) {
486+
if (!i.packedDimForEachOperand[operandPos].has_value())
487487
continue;
488-
res.push_back(spec[i].packedDimForEachOperand[operandPos].value());
488+
res.push_back(i.packedDimForEachOperand[operandPos].value());
489489
}
490490
return res;
491491
}
492492

493493
SmallVector<OpFoldResult>
494494
PackedOperandsDimList::extractPackSizesForOperand(int64_t operandPos) {
495495
SmallVector<OpFoldResult> res;
496-
for (int64_t i = 0, e = spec.size(); i < e; ++i) {
497-
if (!spec[i].packedDimForEachOperand[operandPos].has_value())
496+
for (auto &i : spec) {
497+
if (!i.packedDimForEachOperand[operandPos].has_value())
498498
continue;
499-
res.push_back(spec[i].packedSize);
499+
res.push_back(i.packedSize);
500500
}
501501
return res;
502502
}

0 commit comments

Comments
 (0)