llvm-project/clang-tools-extra/clangd/index
Sam McCall 7d20e80225 [clangd] Show background index status using LSP 3.15 work-done progress notifications
Summary:
It simply shows the completed/total items on the background queue, e.g.
 indexing: 233/1000
The denominator is reset to zero every time the queue goes idle.

The protocol is fairly complicated here (requires creating a remote "progress"
resource before sending updates). We implement the full protocol, but I've added
an extension allowing it to be skipped to reduce the burden on clients - in
particular the lit test takes this shortcut.

The addition of background index progress to DiagnosticConsumer seems ridiculous
at first glance, but I believe that interface is trending in the direction of
"ClangdServer callbacks" anyway. It's due for a rename, but otherwise actually
fits.

Reviewers: kadircet, usaxena95

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D73218
2020-01-24 12:21:08 +01:00
..
dex Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
Background.cpp [clangd] Show background index status using LSP 3.15 work-done progress notifications 2020-01-24 12:21:08 +01:00
Background.h [clangd] Show background index status using LSP 3.15 work-done progress notifications 2020-01-24 12:21:08 +01:00
BackgroundIndexLoader.cpp [clangd] Simplify the callside of URI::resolve, NFC. 2019-09-23 14:39:37 +00:00
BackgroundIndexLoader.h Revert "Revert r366458, r366467 and r366468" 2019-07-19 10:18:52 +00:00
BackgroundIndexStorage.cpp [Support] Add overload writeFileAtomically(std::function Writer) 2019-09-13 20:08:27 +00:00
BackgroundQueue.cpp [clangd] Show background index status using LSP 3.15 work-done progress notifications 2020-01-24 12:21:08 +01:00
BackgroundRebuild.cpp [clangd] Rename ClangdUnit.h -> ParsedAST.h. NFC 2019-09-04 09:46:06 +00:00
BackgroundRebuild.h Revert "Revert r366458, r366467 and r366468" 2019-07-19 10:18:52 +00:00
CanonicalIncludes.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
CanonicalIncludes.h [clangd] Use pre-populated mappings for standard symbols 2019-09-09 15:32:51 +00:00
FileIndex.cpp [clangd] Add xref for macros to FileIndex. 2020-01-08 08:27:50 +01:00
FileIndex.h [clangd] Add xref for macros to FileIndex. 2020-01-08 08:27:50 +01:00
Index.cpp [clangd] Add bool return type to Index::refs API. 2019-11-13 14:42:30 +01:00
Index.h [clangd] Add bool return type to Index::refs API. 2019-11-13 14:42:30 +01:00
IndexAction.cpp [clangd] Set RetainCommentsFromSystemHeaders to true 2019-11-07 09:54:20 +01:00
IndexAction.h [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
MemIndex.cpp [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
MemIndex.h [clangd] Add bool return type to Index::refs API. 2019-11-13 14:42:30 +01:00
Merge.cpp [clangd] Simplify the code in Index::refs 2019-11-14 14:43:29 +01:00
Merge.h [clangd] Add bool return type to Index::refs API. 2019-11-13 14:42:30 +01:00
Ref.cpp Fight a bit against global initializers. NFC. 2019-08-22 19:43:27 +00:00
Ref.h [clangd] Use capacity() instead of size() in RefSlab::bytes() 2019-04-02 08:24:37 +00:00
Relation.cpp [clangd] Use our own relation kind. 2019-10-17 14:08:28 +00:00
Relation.h [clangd] Use our own relation kind. 2019-10-17 14:08:28 +00:00
Serialization.cpp [clangd] Use our own relation kind. 2019-10-17 14:08:28 +00:00
Serialization.h [clangd] Use our own relation kind. 2019-10-17 14:08:28 +00:00
Symbol.cpp Cleanup: llvm::bsearch -> llvm::partition_point after r364719 2019-06-30 11:19:56 +00:00
Symbol.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
SymbolCollector.cpp [clangd] Add xref for macros to FileIndex. 2020-01-08 08:27:50 +01:00
SymbolCollector.h [clangd] Add xref for macros to FileIndex. 2020-01-08 08:27:50 +01:00
SymbolID.cpp [clangd] NFC: fix clang-tidy warnings. 2019-01-25 15:14:03 +00:00
SymbolID.h Moved DenseMap support for SymbolID into SymbolID.h 2019-02-28 11:00:44 +00:00
SymbolLocation.cpp Moved SymbolLocation into its own header and implementation file 2019-02-28 11:02:01 +00:00
SymbolLocation.h [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension 2019-03-27 17:47:49 +00:00
SymbolOrigin.cpp [clangd] Use identifiers in file as completion candidates when build is not ready. 2019-04-11 09:36:36 +00:00
SymbolOrigin.h [clangd] Use identifiers in file as completion candidates when build is not ready. 2019-04-11 09:36:36 +00:00
YAMLSerialization.cpp [clangd] Use our own relation kind. 2019-10-17 14:08:28 +00:00