[PATCH] D56841: [clangd] Filter out plugin related flags.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 17 07:42:07 PST 2019
kadircet planned changes to this revision.
kadircet marked an inline comment as done.
kadircet added a comment.
Moving stripper to tooling.
================
Comment at: clangd/ClangdUnit.cpp:433
+ // <arbitrary-argument>
+ if (I + 4 < E && CommandLine[I] == "-Xclang" &&
+ (CommandLine[I + 1] == "-load" || CommandLine[I + 1] == "-plugin" ||
----------------
ilya-biryukov wrote:
> kadircet wrote:
> > ilya-biryukov wrote:
> > > Maybe move this code into `ClangdServer::getCompileCommand` to keep **all** argument adjustments that we do in clangd in one place.
> > > We add `-resource-dir` there.
> > As mentioned in the change description, we also have a different compiler invocation in `BackgroundIndex` which is not aware of `ClangdServer::getCompileCommand`
> Ah, right :-( That's annoying. Does it also manually override `-resource-dir`? I'd move both into a single place, maybe this function is a better place to do so.
It turned out to be more complicated actually, for example CodeCompletion also invokes a frontend action and it doesn't go through this function.....
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56841/new/
https://reviews.llvm.org/D56841
More information about the cfe-commits
mailing list