[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ClangdServer now provides async code completion API. It is still used synchronously by ClangdLSPServer, more work is needed to allow processing other requests in parallel while completion (or any other request) is running. https://reviews.llvm.org/D38583 Fil

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clangd/ClangdServer.cpp:222 + + std::shared_ptr Preamble = + Resources->getPossiblyStalePreamble(); I think we use "const type" everywhere. Comment at: clangd/ClangdServer.cpp:225 + // A task tha

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 117811. ilya-biryukov added a comment. - Moved 'const' to the left. https://reviews.llvm.org/D38583 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h unittests/clangd/ClangdTests.cpp Index: unittests/clangd/Clang

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.cpp:222 + + std::shared_ptr Preamble = + Resources->getPossiblyStalePreamble(); klimek wrote: > I think we use "const type" everywhere. Sorry, my previously preferred style keeps sneaking

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clangd/ClangdServer.cpp:225 + // A task that will be run asynchronously. + PackagedTask Task([=]() mutable { // 'mutable' to reassign Preamble variable. +if (!Preamble) { ilya-biryukov wrote: > klimek wrote: > > It

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 117820. ilya-biryukov added a comment. - Added a comment about Preamble assignment. https://reviews.llvm.org/D38583 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h unittests/clangd/ClangdTests.cpp Index: unitte

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 117822. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Fixed grammar in a comment. https://reviews.llvm.org/D38583 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h unittests/clan

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.h:236-237 + /// + /// Request is processed asynchronously, you can use returned future to wait + /// for results of async request. + /// klimek wrote: > Extra space before asynchronously. >

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG Comment at: clangd/ClangdServer.h:236-237 + /// + /// Request is processed asynchronously, you can use returned future to wait + /// for results of async request. + /

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 117843. ilya-biryukov added a comment. - Added another missing 'the'. https://reviews.llvm.org/D38583 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h unittests/clangd/ClangdTests.cpp Index: unittests/clangd/Cla

[PATCH] D38583: [clangd] Added async API to run code completion.

2017-10-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314989: [clangd] Added async API to run code completion. (authored by ibiryukov). Repository: rL LLVM https://reviews.llvm.org/D38583 Files: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp clan