clang-tools
7.0.0
|
This manages symbls from files and an in-memory index on all symbols. More...
#include <FileIndex.h>
Public Member Functions | |
FileIndex (std::vector< std::string > URISchemes={}) | |
If URISchemes is empty, the default schemes in SymbolCollector will be used. More... | |
void | update (PathRef Path, ASTContext *AST, std::shared_ptr< Preprocessor > PP) |
Update symbols in Path with symbols in AST . More... | |
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... | |
![]() | |
virtual | ~SymbolIndex ()=default |
This manages symbls from files and an in-memory index on all symbols.
Definition at line 57 of file FileIndex.h.
clang::clangd::FileIndex::FileIndex | ( | std::vector< std::string > | URISchemes = {} | ) |
If URISchemes is empty, the default schemes in SymbolCollector will be used.
Definition at line 48 of file FileIndex.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 MaxCandidateCount).
Implements clang::clangd::SymbolIndex.
Definition at line 96 of file FileIndex.cpp.
|
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 102 of file FileIndex.cpp.
void clang::clangd::FileIndex::update | ( | PathRef | Path, |
ASTContext * | AST, | ||
std::shared_ptr< Preprocessor > | PP | ||
) |
Update symbols in Path
with symbols in AST
.
If AST
is nullptr, this removes all symbols in the file. If AST
is not null, PP
cannot be null and it should be the preprocessor that was used to build AST
.
Definition at line 82 of file FileIndex.cpp.