[Mlir-commits] [mlir] 8a5a782 - [MLIR] Apply clang-tidy fixes for performance-for-range-copy in VariantValue.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Wed Aug 27 09:00:36 PDT 2025


Author: Mehdi Amini
Date: 2025-08-27T08:59:11-07:00
New Revision: 8a5a7829a373cb0be352b2fe7fa292de032564a7

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

LOG: [MLIR] Apply clang-tidy fixes for performance-for-range-copy in VariantValue.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Query/Matcher/VariantValue.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Query/Matcher/VariantValue.cpp b/mlir/lib/Query/Matcher/VariantValue.cpp
index 98ed4cc5df311..02c13638f0cc2 100644
--- a/mlir/lib/Query/Matcher/VariantValue.cpp
+++ b/mlir/lib/Query/Matcher/VariantValue.cpp
@@ -35,7 +35,7 @@ class VariantMatcher::VariadicOpPayload : public VariantMatcher::Payload {
 
   std::optional<DynMatcher> getDynMatcher() const override {
     std::vector<DynMatcher> dynMatchers;
-    for (auto variantMatcher : args) {
+    for (const auto &variantMatcher : args) {
       std::optional<DynMatcher> dynMatcher = variantMatcher.getDynMatcher();
       if (dynMatcher)
         dynMatchers.push_back(dynMatcher.value());


        


More information about the Mlir-commits mailing list