Skip to content

Commit 071207e

Browse files
committed
[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.
1 parent 5b4f2b9 commit 071207e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/Mesh/IR/MeshOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ LogicalResult ClusterOp::verify() {
201201
if (rank <= 0)
202202
return emitOpError("rank of cluster is expected to be a positive integer");
203203

204-
if (getShape().size() > rank)
204+
if (getShape().size() > size_t(rank))
205205
return emitOpError(
206206
"rank of shape is not expected to be larger than rank of cluster");
207207

0 commit comments

Comments
 (0)