clang-tools
8.0.0
|
MemIndex is a naive in-memory index suitable for a small set of symbols. More...
#include <MemIndex.h>
Public Member Functions | |
MemIndex ()=default | |
template<typename SymbolRange , typename RefRange > | |
MemIndex (SymbolRange &&Symbols, RefRange &&Refs) | |
template<typename SymbolRange , typename RefRange , typename Payload > | |
MemIndex (SymbolRange &&Symbols, RefRange &&Refs, Payload &&BackingData, size_t BackingDataSize) | |
bool | fuzzyFind (const FuzzyFindRequest &Req, llvm::function_ref< void(const Symbol &)> Callback) const override |
Matches symbols in the index fuzzily and applies Callback on each matched symbol before returning. More... | |
void | lookup (const LookupRequest &Req, llvm::function_ref< void(const Symbol &)> Callback) const override |
Looks up symbols with any of the given symbol IDs and applies Callback on each matched symbol. More... | |
void | refs (const RefsRequest &Req, llvm::function_ref< void(const Ref &)> Callback) const override |
Finds all occurrences (e.g. More... | |
size_t | estimateMemoryUsage () const override |
Returns estimated size of index (in bytes). More... | |
![]() | |
virtual | ~SymbolIndex ()=default |
Static Public Member Functions | |
static std::unique_ptr< SymbolIndex > | build (SymbolSlab Symbols, RefSlab Refs) |
Builds an index from slabs. The index takes ownership of the data. More... | |
MemIndex is a naive in-memory index suitable for a small set of symbols.
Definition at line 20 of file MemIndex.h.
|
default |
|
inline |
Definition at line 25 of file MemIndex.h.
|
inline |
Definition at line 33 of file MemIndex.h.
|
static |
Builds an index from slabs. The index takes ownership of the data.
Definition at line 19 of file MemIndex.cpp.
|
overridevirtual |
Returns estimated size of index (in bytes).
Implements clang::clangd::SymbolIndex.
Definition at line 87 of file MemIndex.cpp.
|
overridevirtual |
Matches symbols in the index fuzzily and applies Callback
on each matched symbol before returning.
If returned Symbols are used outside Callback, they must be deep-copied!
Returns true if there may be more results (limited by Req.Limit).
Implements clang::clangd::SymbolIndex.
Definition at line 27 of file MemIndex.cpp.
References clang::clangd::FuzzyFindRequest::Query.
|
overridevirtual |
Looks up symbols with any of the given symbol IDs and applies Callback
on each matched symbol.
The returned symbol must be deep-copied if it's used outside Callback.
Implements clang::clangd::SymbolIndex.
Definition at line 59 of file MemIndex.cpp.
|
overridevirtual |
Finds all occurrences (e.g.
references, declarations, definitions) of a symbol and applies Callback
on each result.
Results should be returned in arbitrary order. The returned result must be deep-copied if it's used outside Callback.
Implements clang::clangd::SymbolIndex.
Definition at line 69 of file MemIndex.cpp.