[PATCH] D81456: [clangd] Get rid of WantDiagnostics::Yes

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 04:54:04 PDT 2020


kadircet created this revision.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov.
Herald added a project: clang.
kadircet added a reviewer: sammccall.

This is an extension clangd provides in LSP layer and to embedders of
ClangdServer. Currently there are no users of WantDiagnostics::Yes apart from
our tests, as from a practical point of view it is quite similar to
WantDiagnostics::Auto.

This patch gets rid of WantDiagnostics::Yes to get rid of some logic in
TUScheduler that handles it.

Tests are updated using the facts that an update is executed if:

- there's a read following it, or
- it is the last update in the request queue.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81456

Files:
  clang-tools-extra/clangd/ClangdLSPServer.cpp
  clang-tools-extra/clangd/ClangdServer.h
  clang-tools-extra/clangd/Protocol.h
  clang-tools-extra/clangd/TUScheduler.cpp
  clang-tools-extra/clangd/TUScheduler.h
  clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
  clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
  clang-tools-extra/clangd/unittests/XRefsTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81456.269491.patch
Type: text/x-patch
Size: 16464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200609/6e8d3449/attachment-0001.bin>


More information about the cfe-commits mailing list