Skip to content

[clangd] Use llvm::find (NFC) #143317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading