[Mlir-commits] [mlir] 071207e - [mlir] Fix -Wsign-compare in MeshOps.cpp (NFC)
Jie Fu
llvmlistbot at llvm.org
Mon Jan 15 15:09:08 PST 2024
Author: Jie Fu
Date: 2024-01-16T07:08:24+08:00
New Revision: 071207ea415d73844f6d48be3b83a7e010e3759b
URL: https://github.com/llvm/llvm-project/commit/071207ea415d73844f6d48be3b83a7e010e3759b
DIFF: https://github.com/llvm/llvm-project/commit/071207ea415d73844f6d48be3b83a7e010e3759b.diff
LOG: [mlir] Fix -Wsign-compare in MeshOps.cpp (NFC)
llvm-project/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp:204:25:
error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare]
if (getShape().size() > rank)
~~~~~~~~~~~~~~~~~ ^ ~~~~
1 error generated.
Added:
Modified:
mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
index fa9da596a34587a..f6b6b7c248c432f 100644
--- a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
+++ b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
@@ -201,7 +201,7 @@ LogicalResult ClusterOp::verify() {
if (rank <= 0)
return emitOpError("rank of cluster is expected to be a positive integer");
- if (getShape().size() > rank)
+ if (getShape().size() > size_t(rank))
return emitOpError(
"rank of shape is not expected to be larger than rank of cluster");
More information about the Mlir-commits
mailing list