aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2024-04-03 09:00:23 -0700
committerGitHub <noreply@github.com>2024-04-03 09:00:23 -0700
commit72e2e4f7dc682fa3f6eda9f3cfbd20a8ffaac4e4 (patch)
tree35d90541ec95b1a3ce07c8567ef463800097897e
parent362aa434cc31ccca96749a6db8cd97f5b7d71206 (diff)
downloadllvm-72e2e4f7dc682fa3f6eda9f3cfbd20a8ffaac4e4.zip
llvm-72e2e4f7dc682fa3f6eda9f3cfbd20a8ffaac4e4.tar.gz
llvm-72e2e4f7dc682fa3f6eda9f3cfbd20a8ffaac4e4.tar.bz2
[clang-format] Lambda parameter should be passed by const reference (#87306)
Closes #87254.
-rw-r--r--clang/lib/Format/Format.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index e41cf29..89e6c19 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);
};