[PATCH] D44567: [clangd] Handle multiple callbacks from Sema's completion

2018-03-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327717: [clangd] Handle multiple callbacks from Semas completion (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44567

[PATCH] D44567: [clangd] Handle multiple callbacks from Sema's completion

2018-03-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE327717: [clangd] Handle multiple callbacks from Semas completion (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D44567?vs=138706=138713#toc Repository:

[PATCH] D44567: [clangd] Handle multiple callbacks from Sema's completion

2018-03-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 138706. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44567 Files: clangd/CodeComplete.cpp

[PATCH] D44567: [clangd] Handle multiple callbacks from Sema's completion

2018-03-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/CodeComplete.cpp:454 +if (CCSema) { + log(llvm::formatv("ProcessCodeCompleteResults called multiple times." +

[PATCH] D44567: [clangd] Handle multiple callbacks from Sema's completion

2018-03-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. As a follow-up to an offline discussion: I opted for not excluding results from 'Recovery' contexts, because they are actually somewhat semantically relevant (i.e. contain only local variables from the current function). One example where this is useful are

[PATCH] D44567: [clangd] Handle multiple callbacks from Sema's completion

2018-03-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, klimek. When parser backtracks, we might receive multiple code completion callbacks. Previously we had a failing assertion there, now we take first results and hope