From ffde3acb1b9c0f88f99bda82fd080de2d44ef50b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 21 Mar 2021 10:10:38 -0700 Subject: [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()) { ^ --- mlir/lib/Dialect/Shape/IR/Shape.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp index 3371995..f3a66a7 100644 --- a/mlir/lib/Dialect/Shape/IR/Shape.cpp +++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp @@ -570,9 +570,9 @@ OpFoldResult CstrBroadcastableOp::fold(ArrayRef operands) { // on the input shapes. if ([&] { SmallVector, 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); -- cgit v1.1