clang-tools  14.0.0git
Public Member Functions | List of all members
clang::include_fixer::SymbolIndexManager Class Reference

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::SymbolInfosearch (llvm::StringRef Identifier, bool IsNestedSearch=true, llvm::StringRef FileName="") const
 Search for header files to be included for an identifier. More...
 

Detailed Description

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.

Member Function Documentation

◆ addSymbolIndex()

void clang::include_fixer::SymbolIndexManager::addSymbolIndex ( std::function< std::unique_ptr< SymbolIndex >()>  F)
inline

Definition at line 35 of file SymbolIndexManager.h.

◆ search()

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.

Parameters
IdentifierThe identifier being searched for. May or may not be fully qualified.
IsNestedSearchWhether 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").
Returns
A list of symbol candidates.

Definition at line 72 of file SymbolIndexManager.cpp.


The documentation for this class was generated from the following files: