clang-tools
8.0.0
|
This manages symbols from files and an in-memory index on all symbols. More...
#include <FileIndex.h>
Public Member Functions | |
FileIndex (bool UseDex=true) | |
void | updatePreamble (PathRef Path, ASTContext &AST, std::shared_ptr< Preprocessor > PP) |
Update preamble symbols of file Path with all declarations in AST and macros in PP . More... | |
void | updateMain (PathRef Path, ParsedAST &AST) |
Update symbols and references from main file Path with indexMainDecls . More... | |
![]() | |
MergedIndex (const SymbolIndex *Dynamic, const SymbolIndex *Static) | |
bool | fuzzyFind (const FuzzyFindRequest &, llvm::function_ref< void(const Symbol &)>) const override |
Matches symbols in the index fuzzily and applies Callback on each matched symbol before returning. More... | |
void | lookup (const LookupRequest &, llvm::function_ref< void(const Symbol &)>) const override |
Looks up symbols with any of the given symbol IDs and applies Callback on each matched symbol. More... | |
void | refs (const RefsRequest &, llvm::function_ref< void(const Ref &)>) const override |
Finds all occurrences (e.g. More... | |
size_t | estimateMemoryUsage () const override |
Returns estimated size of index (in bytes). More... | |
![]() | |
virtual | ~SymbolIndex ()=default |
This manages symbols from files and an in-memory index on all symbols.
FIXME: Expose an interface to remove files that are closed.
Definition at line 81 of file FileIndex.h.
clang::clangd::FileIndex::FileIndex | ( | bool | UseDex = true | ) |
Definition at line 193 of file FileIndex.cpp.
Update symbols and references from main file Path
with indexMainDecls
.
Definition at line 209 of file FileIndex.cpp.
References clang::clangd::FileSymbols::buildIndex(), Contents, clang::clangd::indexMainDecls(), clang::clangd::Light, clang::clangd::PickOne, clang::clangd::SwapIndex::reset(), and clang::clangd::FileSymbols::update().
void clang::clangd::FileIndex::updatePreamble | ( | PathRef | Path, |
ASTContext & | AST, | ||
std::shared_ptr< Preprocessor > | PP | ||
) |
Update preamble symbols of file Path
with all declarations in AST
and macros in PP
.
Definition at line 198 of file FileIndex.cpp.