Author: Owen Pan
Date: 2024-04-03T09:00:23-07:00
New Revision: 72e2e4f7dc682fa3f6eda9f3cfbd20a8ffaac4e4

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

LOG: [clang-format] Lambda parameter should be passed by const reference 
(#87306)

Closes #87254.

Added: 
    

Modified: 
    clang/lib/Format/Format.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index e41cf2902a6818..89e6c19b0af45c 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -3581,7 +3581,7 @@ cleanupAroundReplacements(StringRef Code, const 
tooling::Replacements &Replaces,
   // We need to use lambda function here since there are two versions of
   // `cleanup`.
   auto Cleanup = [](const FormatStyle &Style, StringRef Code,
-                    std::vector<tooling::Range> Ranges,
+                    ArrayRef<tooling::Range> Ranges,
                     StringRef FileName) -> tooling::Replacements {
     return cleanup(Style, Code, Ranges, FileName);
   };


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to