[Mlir-commits] [mlir] 60d13b8 - Apply clang-tidy fixes for performance-move-const-arg in ReductionNode.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sun Jan 9 17:05:42 PST 2022


Author: Mehdi Amini
Date: 2022-01-10T01:05:14Z
New Revision: 60d13b85ca13c7766eb7d65614b15996f19ed710

URL: https://github.com/llvm/llvm-project/commit/60d13b85ca13c7766eb7d65614b15996f19ed710
DIFF: https://github.com/llvm/llvm-project/commit/60d13b85ca13c7766eb7d65614b15996f19ed710.diff

LOG: Apply clang-tidy fixes for performance-move-const-arg in ReductionNode.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Reducer/ReductionNode.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Reducer/ReductionNode.cpp b/mlir/lib/Reducer/ReductionNode.cpp
index 2288b0ac0be15..957ce1d21ad5a 100644
--- a/mlir/lib/Reducer/ReductionNode.cpp
+++ b/mlir/lib/Reducer/ReductionNode.cpp
@@ -63,7 +63,7 @@ ArrayRef<ReductionNode *> ReductionNode::generateNewVariants() {
     for (const Range &range : getRanges()) {
       std::vector<Range> subRanges = getRanges();
       llvm::erase_value(subRanges, range);
-      variants.push_back(createNewNode(std::move(subRanges)));
+      variants.push_back(createNewNode(subRanges));
     }
 
     return getVariants().drop_front(oldNumVariant);
@@ -91,7 +91,7 @@ ArrayRef<ReductionNode *> ReductionNode::generateNewVariants() {
   *subRangesIter = std::make_pair(maxRange.first, half);
   variants.push_back(createNewNode(subRanges));
   *subRangesIter = std::make_pair(half, maxRange.second);
-  variants.push_back(createNewNode(std::move(subRanges)));
+  variants.push_back(createNewNode(subRanges));
 
   auto it = ranges.insert(maxElement, std::make_pair(half, maxRange.second));
   it = ranges.insert(it, std::make_pair(maxRange.first, half));


        


More information about the Mlir-commits mailing list