[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-08-01 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338597: [clangd] allow clients to control the compilation database by passing in (authored by arphaman, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-08-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Thanks! LGTM https://reviews.llvm.org/D49758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/clangd/did-change-configuration-params.test:43 +# +# ERR: Updating file /clangd-test/foo.c with command [/clangd-test2] clang -c foo.c -Wall -Werror +# Don't reparse the second file: ilya-biryukov wrote: > Matchin

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 158376. arphaman marked 3 inline comments as done. arphaman added a comment. Updated to address review comments. https://reviews.llvm.org/D49758 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationDatabase.cpp clangd/

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Just a few nits left. Comment at: clangd/ClangdLSPServer.cpp:422 +std::move(Entry.second.workingDirectory), +llvm::sys::path::filename(File), +std::move(Entry.second.compilati

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clangd/tool/ClangdMain.cpp:170 +static llvm::cl::opt +InMemoryCompileCommands("in-memory-compile-commands", +llvm::cl::desc("Use an in-memory compile commands"), ilya-biryukov wrote: > T

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 158024. arphaman marked 6 inline comments as done. arphaman added a comment. Address review comments https://reviews.llvm.org/D49758 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationDatabase.cpp clangd/GlobalCompil

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.h:106 CachingCompilationDb CDB; + InMemoryCompilationDb InMemoryCDB; This code starts to be a little hard to follow. Could we extract it into an external class that encapsulates this l

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 157762. arphaman marked 2 inline comments as done. arphaman added a comment. Updated patch to address review comments: - The compilation database updated are used only when '-in-memory-compile-commands' flag is used. - It's now possible to set the working d

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D49758#1178056, @ilya-biryukov wrote: > In https://reviews.llvm.org/D49758#1177747, @arphaman wrote: > > > In https://reviews.llvm.org/D49758#1174629, @ilya-biryukov wrote: > > > > > The mode of operation where compile commands come from the c

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Protocol.h:429 + // The changes that happened to the compilation database. + llvm::Optional>> + compilationDatabaseChanges; arphaman wrote: > ilya-biryukov wrote: > > - Maybe add a comment that the ke

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D49758#1177747, @arphaman wrote: > In https://reviews.llvm.org/D49758#1174629, @ilya-biryukov wrote: > > > The mode of operation where compile commands come from the client seems > > useful, but I wonder if there's any value in mixing it

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clangd/Protocol.h:429 + // The changes that happened to the compilation database. + llvm::Optional>> + compilationDatabaseChanges; ilya-biryukov wrote: > - Maybe add a comment that the key of the map is a file na

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D49758#1174629, @ilya-biryukov wrote: > 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. > Do you plan to

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. 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. Do you plan to use the overridden commands in conjunction with CDB plugins or do you

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: malaperle-ericsson, ilya-biryukov, sammccall, jkorous. arphaman added a project: clang-tools-extra. Herald added subscribers: dexonsmith, MaskRay, ioeric. This patch is based on https://reviews.llvm.org/D49523. It extends the 'workspace/di