Skip to content

Commit 06011fe

Browse files
committed
[mlir] Fix -Wsign-compare in ComplexToStandard.cpp (NFC)
/llvm-project/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp:529:21: error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare] 529 | for (int i = 1; i < coefficients.size(); ++i) { | ~ ^ ~~~~~~~~~~~~~~~~~~~ 1 error generated.
1 parent c0cbcb4 commit 06011fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ Value evaluatePolynomial(ImplicitLocOpBuilder &b, Value arg,
526526
auto argType = mlir::cast<FloatType>(arg.getType());
527527
Value poly =
528528
b.create<arith::ConstantOp>(b.getFloatAttr(argType, coefficients[0]));
529-
for (int i = 1; i < coefficients.size(); ++i) {
529+
for (unsigned i = 1; i < coefficients.size(); ++i) {
530530
poly = b.create<math::FmaOp>(
531531
poly, arg,
532532
b.create<arith::ConstantOp>(b.getFloatAttr(argType, coefficients[i])),

0 commit comments

Comments
 (0)