This patch is based on https://reviews.llvm.org/D49523.
It extends the 'workspace/didChangeConfiguration' request to allow us to pass in a compilation database subset that we would like to update in the workspace.
Differential D49758
[clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request arphaman on Jul 24 2018, 1:59 PM. Authored by
Details
This patch is based on https://reviews.llvm.org/D49523. It extends the 'workspace/didChangeConfiguration' request to allow us to pass in a compilation database subset that we would like to update in the workspace.
Diff Detail
Event TimelineComment Actions The mode of operation where compile commands come from the client seems useful, but I wonder if there's any value in mixing it with compile_commands.json and other CDB plugins.
Comment Actions The client will control the commands exclusively.
Comment Actions Maybe a cleaner design would be to untangle the two use-cases and control them with a flag to clangd?
The command-line arg to clangd will control which implementation is used. The advantage is that we don't have to think about interactions between the clang plugins and explicit overrides and it should be easier to make sure that we don't accidentally read compilation args from the wrong place.
Comment Actions Sounds good to me. I'll update the patch to do that. Comment Actions Updated patch to address review comments:
Comment Actions Address review comments
Comment Actions Just a few nits left.
Comment Actions Updated to address review comments.
|
Other usages of FileName in tooling::CompileCommand seem to set this either to an absolute or a relative-to-cwd path to the file for the command.
Maybe put the whole filepath there too? (even though I don't think we particularly rely on this anywhere in clangd)