10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MEMINDEX_H 11 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MEMINDEX_H 25 void build(std::shared_ptr<std::vector<const Symbol *>> Symbols);
39 std::shared_ptr<std::vector<const Symbol *>> Symbols;
42 llvm::DenseMap<SymbolID, const Symbol *> Index;
43 mutable std::mutex Mutex;
49 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MEMINDEX_H
void build(std::shared_ptr< std::vector< const Symbol *>> Symbols)
(Re-)Build index for Symbols.
Interface for symbol indexes that can be used for searching or matching symbols among a set of symbol...
llvm::unique_function< void(llvm::Expected< T >)> Callback
A Callback<T> is a void function that accepts Expected<T>.
This implements an index for a (relatively small) set of symbols that can be easily managed in memory...
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
virtual 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...
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...