[clang-tools-extra] 240ff85 - [clangd] Use llvm::find (NFC) (#143317)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 8 16:18:19 PDT 2025
Author: Kazu Hirata
Date: 2025-06-08T16:18:16-07:00
New Revision: 240ff854adae4278a6f5fb232bf5f76dd9b81c69
URL: https://github.com/llvm/llvm-project/commit/240ff854adae4278a6f5fb232bf5f76dd9b81c69
DIFF: https://github.com/llvm/llvm-project/commit/240ff854adae4278a6f5fb232bf5f76dd9b81c69.diff
LOG: [clangd] Use llvm::find (NFC) (#143317)
Added:
Modified:
clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp b/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
index 03e65768c26a6..ae2d98ce90d8f 100644
--- a/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
+++ b/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
@@ -247,13 +247,11 @@ import Dep;
ProjectModules->getRequiredModules(getFullPath("M.cppm")).empty());
// Set the mangler to filter out the invalid flag
- ProjectModules->setCommandMangler(
- [](tooling::CompileCommand &Command, PathRef) {
- auto const It =
- std::find(Command.CommandLine.begin(), Command.CommandLine.end(),
- "-invalid-unknown-flag");
- Command.CommandLine.erase(It);
- });
+ ProjectModules->setCommandMangler([](tooling::CompileCommand &Command,
+ PathRef) {
+ auto const It = llvm::find(Command.CommandLine, "-invalid-unknown-flag");
+ Command.CommandLine.erase(It);
+ });
// And now it returns a non-empty list of required modules since the
// compilation succeeded
More information about the cfe-commits
mailing list