[Mlir-commits] [mlir] a68c8d3 - Apply clang-tidy fixes for performance-for-range-copy to MLIR (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Jan 13 18:28:03 PST 2022


Author: Mehdi Amini
Date: 2022-01-14T02:26:27Z
New Revision: a68c8d3009b47856bb844f8eda8a5edec83d30bd

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

LOG: Apply clang-tidy fixes for performance-for-range-copy to MLIR (NFC)

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Linalg/Utils/Utils.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
index 935b054cf3e4f..7646ef2b5df67 100644
--- a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
+++ b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
@@ -41,7 +41,7 @@ template <typename T, unsigned N>
 void applyPermutationToVector(SmallVector<T, N> &inVec,
                               ArrayRef<int64_t> permutation) {
   SmallVector<T, N> auxVec(inVec.size());
-  for (auto en : enumerate(permutation))
+  for (const auto &en : enumerate(permutation))
     auxVec[en.index()] = inVec[en.value()];
   inVec = auxVec;
 }


        


More information about the Mlir-commits mailing list