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

Closes #87254.
This commit is contained in:
Owen Pan 2024-04-03 09:00:23 -07:00 committed by GitHub
parent 362aa434cc
commit 72e2e4f7dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
};