[Mlir-commits] [mlir] 962534c - [mlir] Apply ClangTidy BugProne patch

Adrian Kuegel llvmlistbot at llvm.org
Thu Apr 11 03:29:08 PDT 2024


Author: Adrian Kuegel
Date: 2024-04-11T10:28:10Z
New Revision: 962534c4b490239269bb2e11d036596826539046

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

LOG: [mlir] Apply ClangTidy BugProne patch

This time for real.

Added: 
    

Modified: 
    mlir/lib/Transforms/Utils/DialectConversion.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index f4e34a03d3d09a..d85938847c776c 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -757,7 +757,7 @@ class UnresolvedMaterializationRewrite : public OperationRewrite {
 /// rewrite type and operation among the given rewrites.
 template <typename RewriteTy, typename R>
 static bool hasRewrite(R &&rewrites, Operation *op) {
-  return any_of(std::forward(rewrites), [&](auto &rewrite) {
+  return any_of(std::forward<R>(rewrites), [&](auto &rewrite) {
     auto *rewriteTy = dyn_cast<RewriteTy>(rewrite.get());
     return rewriteTy && rewriteTy->getOperation() == op;
   });


        


More information about the Mlir-commits mailing list