mirror of https://github.com/llvm/torch-mlir
Fix GCC warning recommending parens.
Found with a more strict set of warning flags on GCC 9.pull/2441/head
parent
9cb5d38cd1
commit
29fdc3833c
|
@ -104,8 +104,8 @@ void checkDimEqualHelper(OpBuilder &b, Location loc, Value lhsDim,
|
||||||
Type lhsType = lhsDim.getType();
|
Type lhsType = lhsDim.getType();
|
||||||
Type rhsType = rhsDim.getType();
|
Type rhsType = rhsDim.getType();
|
||||||
auto checkIntOrIndex = [](Type type) {
|
auto checkIntOrIndex = [](Type type) {
|
||||||
assert(type.isa<IntegerType>() ||
|
assert((type.isa<IntegerType>() || type.isa<IndexType>()) &&
|
||||||
type.isa<IndexType>() && "must be either integer or index type");
|
"must be either integer or index type");
|
||||||
};
|
};
|
||||||
checkIntOrIndex(lhsType);
|
checkIntOrIndex(lhsType);
|
||||||
checkIntOrIndex(rhsType);
|
checkIntOrIndex(rhsType);
|
||||||
|
|
Loading…
Reference in New Issue