[PATCH] D107637: [clangd] Canonicalize inputs provided with `--`
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 6 06:14:58 PDT 2021
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:250
+ ArgList.getLastArgNoClaim(driver::options::OPT__DASH_DASH)) {
+ for (auto I = 0U; I <= DashDash->getNumValues(); ++I)
+ IndicesToDrop.push_back(DashDash->getIndex() + I);
----------------
sammccall wrote:
> iterate from dashdash->getIndex() + 1 to Cmd.size() instead?
>
> Or just Cmd.resize(dashdash->getIndex() + 2)?
ah yes, resize looks a lot better. but we deliberately drop `--` too. so that we can always append it without checking again.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107637/new/
https://reviews.llvm.org/D107637
More information about the cfe-commits
mailing list