Skip to content

Commit cce026b

Browse files
committed
[mlir][test] Fix -Wsign-compare in TestDialect.cpp (NFC)
llvm-project/mlir/test/lib/Dialect/Test/TestDialect.cpp:597:31: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare] if (getVarOperands().size() != expectedNumOperands) ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~ 1 error generated.
1 parent 80fce05 commit cce026b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/test/lib/Dialect/Test/TestDialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ LogicalResult CompareOp::verify() {
594594
"'compose' not supported when 'lhs_map' or 'rhs_map' is present");
595595
int64_t expectedNumOperands = getLhsMap() ? getLhsMap()->getNumInputs() : 1;
596596
expectedNumOperands += getRhsMap() ? getRhsMap()->getNumInputs() : 1;
597-
if (getVarOperands().size() != expectedNumOperands)
597+
if (getVarOperands().size() != size_t(expectedNumOperands))
598598
return emitOpError("expected ")
599599
<< expectedNumOperands << " operands, but got "
600600
<< getVarOperands().size();

0 commit comments

Comments
 (0)