diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-05-22 13:10:09 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-05-22 13:10:09 +0000 |
commit | 06a485d390574d2b41658a04aabd64d8ce638429 (patch) | |
tree | 8964517e5b6835da7a53f256dacb3be92eb41298 /clang-tools-extra/clangd/CodeComplete.cpp | |
parent | 8557ec5d642a86bc7d0fa3d95f5f6023a7b7cb26 (diff) | |
download | bcm5719-llvm-06a485d390574d2b41658a04aabd64d8ce638429.tar.gz bcm5719-llvm-06a485d390574d2b41658a04aabd64d8ce638429.zip |
[clangd] Remove ignored Preamble::CanReuse call from completion
Summary:
Now that the clients who relied on stats for files from preamble are
gone.
Reviewers: ioeric, sammccall
Reviewed By: ioeric
Subscribers: klimek, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D47066
llvm-svn: 332976
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.cpp')
-rw-r--r-- | clang-tools-extra/clangd/CodeComplete.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index 1b1020a9888..af220f220d4 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -654,21 +654,11 @@ bool semaCodeComplete(std::unique_ptr<CodeCompleteConsumer> Consumer, std::unique_ptr<llvm::MemoryBuffer> ContentsBuffer = llvm::MemoryBuffer::getMemBufferCopy(Input.Contents, Input.FileName); + // The diagnostic options must be set before creating a CompilerInstance. + CI->getDiagnosticOpts().IgnoreWarnings = true; // We reuse the preamble whether it's valid or not. This is a // correctness/performance tradeoff: building without a preamble is slow, and // completion is latency-sensitive. - if (Input.Preamble) { - auto Bounds = - ComputePreambleBounds(*CI->getLangOpts(), ContentsBuffer.get(), 0); - // FIXME(ibiryukov): Remove this call to CanReuse() after we'll fix - // clients relying on getting stats for preamble files during code - // completion. - // Note that results of CanReuse() are ignored, see the comment above. - Input.Preamble->CanReuse(*CI, ContentsBuffer.get(), Bounds, - Input.VFS.get()); - } - // The diagnostic options must be set before creating a CompilerInstance. - CI->getDiagnosticOpts().IgnoreWarnings = true; auto Clang = prepareCompilerInstance( std::move(CI), Input.Preamble, std::move(ContentsBuffer), std::move(Input.PCHs), std::move(Input.VFS), DummyDiagsConsumer); |