llvm-project/clang-tools-extra/clangd/index
JF Bastien 0e82895826 BitStream reader: propagate errors
The bitstream reader handles errors poorly. This has two effects:

 * Bugs in file handling (especially modules) manifest as an "unexpected end of
   file" crash
 * Users of clang as a library end up aborting because the code unconditionally
   calls `report_fatal_error`

The bitstream reader should be more resilient and return Expected / Error as
soon as an error is encountered, not way late like it does now. This patch
starts doing so and adopting the error handling where I think it makes sense.
There's plenty more to do: this patch propagates errors to be minimally useful,
and follow-ups will propagate them further and improve diagnostics.

https://bugs.llvm.org/show_bug.cgi?id=42311
<rdar://problem/33159405>

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

llvm-svn: 364464
2019-06-26 19:50:12 +00:00
..
dex [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Background.cpp BitStream reader: propagate errors 2019-06-26 19:50:12 +00:00
Background.h [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread 2019-05-09 12:04:07 +00:00
BackgroundIndexStorage.cpp [clangd] Delete an unused declaration 2019-05-01 12:16:37 +00:00
CanonicalIncludes.cpp [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
CanonicalIncludes.h [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
FileIndex.cpp [clangd] Perform merge for main file symbols. 2019-06-17 14:49:18 +00:00
FileIndex.h [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Index.cpp [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Index.h [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
IndexAction.cpp [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
IndexAction.h [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
MemIndex.cpp [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
MemIndex.h [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Merge.cpp [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Merge.h [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Ref.cpp [clangd] Deduplicate Refs on the fly. 2019-03-08 09:26:30 +00:00
Ref.h [clangd] Use capacity() instead of size() in RefSlab::bytes() 2019-04-02 08:24:37 +00:00
Relation.cpp [clangd] Add RelationSlab 2019-06-03 04:55:46 +00:00
Relation.h [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Serialization.cpp [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Serialization.h [clangd] Serialization support for RelationSlab 2019-06-03 05:07:52 +00:00
Symbol.cpp [clangd] Fix header-guard check for include insertion, and don't index header guards. 2019-05-03 13:17:29 +00:00
Symbol.h [clangd] Fix header-guard check for include insertion, and don't index header guards. 2019-05-03 13:17:29 +00:00
SymbolCollector.cpp [clangd] SymbolCollector support for relations 2019-06-04 04:25:44 +00:00
SymbolCollector.h [clangd] SymbolCollector support for relations 2019-06-04 04:25:44 +00: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] Serialization support for RelationSlab 2019-06-03 05:07:52 +00:00