[clangd] Don't override the preamble while completing inside it, it doesn't work.
authorSam McCall <sam.mccall@gmail.com>
Fri, 14 Sep 2018 12:36:06 +0000 (12:36 +0000)
committerSam McCall <sam.mccall@gmail.com>
Fri, 14 Sep 2018 12:36:06 +0000 (12:36 +0000)
commitebef81227b9e80e4255707a84736af7f994ac0fd
tree9a83bb809efa0ab3f2183e35026627992e44c6ae
parent053c9ee82650907a0e12a65ca43a1958692ed2fd
[clangd] Don't override the preamble while completing inside it, it doesn't work.

Summary:
To stay fast, enable single-file-mode instead. This is fine since completions
in the preamble are simple.

The net effect for now is to suppress the spurious TopLevel completions when
completing inside the preamble.
Once Sema has include directive completion, this will be more important.

Reviewers: ilya-biryukov

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

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

llvm-svn: 342230
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp