[PATCH] D62839: [clangd] Index API and implementations for relations
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 13 01:43:52 PDT 2019
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/index/Index.h:77
+struct RelationsRequest {
+ SymbolID Subject;
+ index::SymbolRole Predicate;
----------------
nridge wrote:
> kadircet wrote:
> > sorry for missing it in previous iteration. but this should also enable batch queries. let's make this one a `llvm::DenseMap<SymbolID>`.
> > And in the callback we should output both the `SymbolID` of the `Subject` and `Object`.
> >
> > We have a network based index(internally) and it uses this batch query optimization to get rid of network latency.
> What is an example use case for a batch query? In a typical LSP editor, the user can only request a type hierarchy for one class at a time.
yes, that's not really applicable to TypeHierarchy, but we are rather introducing another endpoint to an existing API(`SymbolIndex`), which will be used by a lot more clients later on.
The first example that comes to my mind is, fetching all overrides of a class' virtual methods for example.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62839/new/
https://reviews.llvm.org/D62839
More information about the cfe-commits
mailing list