Skip to content

Commit 27be33a

Browse files
kazutakahiratarorth
authored andcommitted
[clangd] Use llvm::find (NFC) (llvm#143317)
1 parent f3c6837 commit 27be33a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,11 @@ import Dep;
247247
ProjectModules->getRequiredModules(getFullPath("M.cppm")).empty());
248248

249249
// Set the mangler to filter out the invalid flag
250-
ProjectModules->setCommandMangler(
251-
[](tooling::CompileCommand &Command, PathRef) {
252-
auto const It =
253-
std::find(Command.CommandLine.begin(), Command.CommandLine.end(),
254-
"-invalid-unknown-flag");
255-
Command.CommandLine.erase(It);
256-
});
250+
ProjectModules->setCommandMangler([](tooling::CompileCommand &Command,
251+
PathRef) {
252+
auto const It = llvm::find(Command.CommandLine, "-invalid-unknown-flag");
253+
Command.CommandLine.erase(It);
254+
});
257255

258256
// And now it returns a non-empty list of required modules since the
259257
// compilation succeeded

0 commit comments

Comments
 (0)