[PATCH] D106562: [clangd] Get rid of arg adjusters in CommandMangler
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 23 06:58:58 PDT 2021
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:225
+ auto It = llvm::find(Cmd, "--");
+ for (std::string &Arg : ToAppend)
+ Cmd.insert(It++, std::move(Arg));
----------------
sammccall wrote:
> oops, might have left this comment on the wrong patch
>
> use range insert to save shuffling the tail over and over and std::make_move_iterator() to avoid copies?
yeah the main reason this is a loop is because I didn't know about `make_move_iterator`, switching to a range insert instead, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106562/new/
https://reviews.llvm.org/D106562
More information about the cfe-commits
mailing list