llvm-project/clang-tools-extra/clangd/index
Haojian Wu b5ce4e5ea3 [clangd] Perform merge for main file symbols.
Summary:
Previously, we randomly pick one main file symbol in dynamic index, we
may loose the ideal symbol (with definition location) in the index.

It fixes the issue where sometimes we fail to go to the symbol definition, see:

1. call go-to-decl on Foo in Foo.cpp
2. jump to Foo.h, call go-to-def on Foo in Foo.h

we can't go back to Foo.cpp -- because we open Foo.cpp, Foo.h in clangd, both
files have Foo symbol (one with def&decl, one with decl only), we randomely
choose one.

Reviewers: kadircet

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

Tags: #clang

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

llvm-svn: 363568
2019-06-17 14:49:18 +00:00
..
dex [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +00:00
Background.cpp [clangd] Index API and implementations for relations 2019-06-15 02:26:47 +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] Fix buildbot error. 2019-05-29 14:11:53 +00:00
CanonicalIncludes.h [clangd] Include insertion: require header guards, drop other heuristics, treat .def like .inc. 2019-04-17 10:36:02 +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] Index API and implementations for relations 2019-06-15 02:26:47 +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