[PATCH] D59086: [clangd] Adjust compile commands to be applicable for tooling
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 7 07:31:01 PST 2019
gribozavr accepted this revision.
gribozavr added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clangd/GlobalCompilationDatabase.cpp:24
llvm::StringRef ResourceDir) {
+ // Clangd does not generate dependency file.
+ Cmd.CommandLine = tooling::getClangStripDependencyFileAdjuster()(
----------------
Please don't duplicate code in comments. Explain why it shouldn't generate the dependency files, or drop the comment.
================
Comment at: clangd/GlobalCompilationDatabase.h:116
+ /// Adjusts given compile command for clangd.
+ tooling::CompileCommand adjustArguments(tooling::CompileCommand Cmd) const;
+
----------------
kadircet wrote:
> hokein wrote:
> > ioeric wrote:
> > > This doesn't seem to be used in this patch (except for tests). Could you include intended uses in the patch so we can understand the problem better?
> > Looks like this patch introduces two changes:
> >
> > - move the internal adjustArguments to public, I have the same question, any reason doing it? because we can test it?
> > - add additional Adjusters to adjustArguments
> It was only for testing
This patch also changes `getCompileCommand` to call `adjustArguments`.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59086/new/
https://reviews.llvm.org/D59086
More information about the cfe-commits
mailing list