clang-tools 10.0.0

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::SymbolInfo > | search (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

  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").

Returns
  A list of symbol candidates.

Definition at line 72 of file SymbolIndexManager.cpp.

References clang::find_all_symbols::SymbolInfo::EnumConstantDecl, clang::find_all_symbols::SymbolInfo::EnumDecl, clang::find_all_symbols::SymbolInfo::Function, clang::find_all_symbols::SymbolInfo::getContexts(), clang::find_all_symbols::SymbolInfo::getSymbolKind(), clang::find_all_symbols::SymbolInfo::Macro, clang::include_fixer::rank(), Symbols, and clang::find_all_symbols::SymbolInfo::Variable.

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

- SymbolIndexManager.h
- SymbolIndexManager.cpp