[ShapeDialect] Silence a build warning, NFC

mlir/lib/Dialect/Shape/IR/Shape.cpp:573:26: warning: loop variable 'shape' is always a copy because the range of type '::mlir::Operation::operand_range' (aka 'mlir::OperandRange') does not return a reference [-Wrange-loop-analysis]
        for (const auto &shape : shapes()) {
                         ^
This commit is contained in:
Chris Lattner 2021-03-21 10:10:38 -07:00
parent 3a506b31a3
commit ffde3acb1b
1 changed files with 2 additions and 2 deletions

View File

@ -570,9 +570,9 @@ OpFoldResult CstrBroadcastableOp::fold(ArrayRef<Attribute> operands) {
// on the input shapes.
if ([&] {
SmallVector<SmallVector<int64_t, 6>, 6> extents;
for (const auto &shape : shapes()) {
for (auto shapeValue : shapes()) {
extents.emplace_back();
if (failed(getShapeVec(shape, extents.back())))
if (failed(getShapeVec(shapeValue, extents.back())))
return false;
}
return OpTrait::util::staticallyKnownBroadcastable(extents);