aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <clattner@nondot.org>2021-03-21 10:10:38 -0700
committerChris Lattner <clattner@nondot.org>2021-03-21 10:10:38 -0700
commitffde3acb1b9c0f88f99bda82fd080de2d44ef50b (patch)
tree6d94a6dc67b05b2403e276acb63576275699019a
parent3a506b31a341585a21b21c42253ea9fc54c55b37 (diff)
downloadllvm-ffde3acb1b9c0f88f99bda82fd080de2d44ef50b.zip
llvm-ffde3acb1b9c0f88f99bda82fd080de2d44ef50b.tar.gz
llvm-ffde3acb1b9c0f88f99bda82fd080de2d44ef50b.tar.bz2
[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()) { ^
-rw-r--r--mlir/lib/Dialect/Shape/IR/Shape.cpp4
1 files 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<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);