[clangd] Return empty results on spurious completion triggers
authorIlya Biryukov <ibiryukov@google.com>
Fri, 7 Jun 2019 16:24:38 +0000 (16:24 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Fri, 7 Jun 2019 16:24:38 +0000 (16:24 +0000)
commita7a1147d4f0901841dc0432b1988debc0ce09b31
tree4984791efeeef6d0b4a82a3cccc60b713805377f
parente490e4a0e7ea2d5705a28c16509ef7da85042ff6
[clangd] Return empty results on spurious completion triggers

Summary:
We currently return an error, this causes `coc.nvim` and VSCode to
show an error message in the logs.

Returning empty list of completions allows to avod the error message
without altering other user-visible behavior.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62999

llvm-svn: 362811
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/test/completion-auto-trigger.test