Apply clang-tidy fixes for performance-for-range-copy in ElementwiseOpFusion.cpp...
authorMehdi Amini <joker.eph@gmail.com>
Sat, 8 Jan 2022 21:26:54 +0000 (21:26 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 10 Jan 2022 01:05:14 +0000 (01:05 +0000)
mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp

index 8f7c331..ce636f3 100644 (file)
@@ -610,7 +610,8 @@ LogicalResult isGenericOpExpandable(GenericOp genericOp,
                                     PatternRewriter &rewriter) {
   // Current reshape only supports expansion of a dynamic dim when only one of
   // the expanded dims are dynamic.
-  for (auto originalShape : llvm::enumerate(expansionInfo.getOriginalShape()))
+  for (const auto &originalShape :
+       llvm::enumerate(expansionInfo.getOriginalShape()))
     if (ShapedType::isDynamic(originalShape.value())) {
       // All but one of the expanded dims must be static.
       bool foundDynamicExpandedDim = false;