clang-tools 20.0.0git
|
This class provides an interface for finding the header files corresponding to an identifier in the source code from multiple symbol databases. More...
#include <SymbolIndexManager.h>
Public Member Functions | |
void | addSymbolIndex (std::function< std::unique_ptr< SymbolIndex >()> F) |
std::vector< find_all_symbols::SymbolInfo > | search (llvm::StringRef Identifier, bool IsNestedSearch=true, llvm::StringRef FileName="") const |
Search for header files to be included for an identifier. | |
This class provides an interface for finding the header files corresponding to an identifier in the source code from multiple symbol databases.
Definition at line 33 of file SymbolIndexManager.h.
|
inline |
Definition at line 35 of file SymbolIndexManager.h.
std::vector< find_all_symbols::SymbolInfo > clang::include_fixer::SymbolIndexManager::search | ( | llvm::StringRef | Identifier, |
bool | IsNestedSearch = true , |
||
llvm::StringRef | FileName = "" |
||
) | const |
Search for header files to be included for an identifier.
Identifier | The identifier being searched for. May or may not be fully qualified. |
IsNestedSearch | Whether searching nested classes. If true, the method tries to strip identifier name parts from the end until it finds the corresponding candidates in database (e.g for identifier "b::foo", the method will try to find "b" if it fails to find "b::foo"). |
Definition at line 76 of file SymbolIndexManager.cpp.
References clang::find_all_symbols::SymbolInfo::EnumConstantDecl, clang::find_all_symbols::SymbolInfo::EnumDecl, FileName, clang::find_all_symbols::SymbolInfo::Function, clang::find_all_symbols::SymbolInfo::Macro, clang::include_fixer::rank(), and clang::find_all_symbols::SymbolInfo::Variable.