[Mlir-commits] [mlir] c12f73b - [MLIR] Apply clang-tidy fixes for modernize-loop-convert in Utils.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri Feb 20 14:48:03 PST 2026
Author: Mehdi Amini
Date: 2026-02-20T14:45:47-08:00
New Revision: c12f73b3d65f262ffdc77879001d609df45a98aa
URL: https://github.com/llvm/llvm-project/commit/c12f73b3d65f262ffdc77879001d609df45a98aa
DIFF: https://github.com/llvm/llvm-project/commit/c12f73b3d65f262ffdc77879001d609df45a98aa.diff
LOG: [MLIR] Apply clang-tidy fixes for modernize-loop-convert in Utils.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Affine/Utils/Utils.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Affine/Utils/Utils.cpp b/mlir/lib/Dialect/Affine/Utils/Utils.cpp
index f3dfe15219294..c905162987c39 100644
--- a/mlir/lib/Dialect/Affine/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/Affine/Utils/Utils.cpp
@@ -1821,10 +1821,9 @@ mlir::affine::normalizeMemRef(memref::ReinterpretCastOp reinterpretCastOp) {
oldLayoutMap.getResult(i)),
mapOperands));
}
- for (unsigned i = 0, e = newSizes.size(); i < e; i++) {
- newSizes[i] =
- arith::AddIOp::create(b, loc, newSizes[i].getType(), newSizes[i],
- arith::ConstantIndexOp::create(b, loc, 1));
+ for (auto &newSize : newSizes) {
+ newSize = arith::AddIOp::create(b, loc, newSize.getType(), newSize,
+ arith::ConstantIndexOp::create(b, loc, 1));
}
// Create the new reinterpret_cast op.
auto newReinterpretCast = memref::ReinterpretCastOp::create(
More information about the Mlir-commits
mailing list