clang-tools 10.0.0

Classes | Public Types | Public Member Functions | Friends | List of all members
clang::find_all_symbols::SymbolInfo Class Reference

Describes a named symbol from a header. More...

`#include <SymbolInfo.h>`

## Classes
struct | Signals

## Public Types
enum | SymbolKind { SymbolKind::Function, SymbolKind::Class, SymbolKind::Variable, SymbolKind::TypedefName, SymbolKind::EnumDecl, SymbolKind::EnumConstantDecl, SymbolKind::Macro, SymbolKind::Unknown }
| The SymbolInfo Type. More...
enum | ContextType { ContextType::Namespace, ContextType::Record, ContextType::EnumDecl }
| The Context Type. More...
typedef std::pair< ContextType, std::string > | Context
| A pair of <ContextType, ContextName>. More...
using | SignalMap = std::map< SymbolInfo, Signals >

## Public Member Functions
| SymbolInfo ()
| SymbolInfo (llvm::StringRef Name, SymbolKind Type, llvm::StringRef FilePath, const std::vector< Context > &Contexts)
void | SetFilePath (llvm::StringRef Path)
llvm::StringRef | getName () const
| Get symbol name. More...
std::string | getQualifiedName () const
| Get the fully-qualified symbol name. More...
SymbolKind | getSymbolKind () const
| Get symbol type. More...
llvm::StringRef | getFilePath () const
| Get a relative file path where symbol comes from. More...
const std::vector< SymbolInfo::Context > & | getContexts () const
| Get symbol contexts. More...
bool | operator< (const SymbolInfo &Symbol) const
bool | operator== (const SymbolInfo &Symbol) const

## Friends
struct | llvm::yaml::MappingTraits< struct SymbolAndSignals >

## Detailed Description

Describes a named symbol from a header.

Symbols with the same qualified name and type (e.g. function overloads) that appear in the same header are represented by a single SymbolInfo.

TODO: keep track of instances, e.g. overload locations and signatures.

Definition at line 27 of file SymbolInfo.h.

## Member Typedef Documentation

## ◆ Context

typedef std::pair<ContextType, std::string> clang::find_all_symbols::SymbolInfo::Context

A pair of <ContextType, ContextName>.

Definition at line 49 of file SymbolInfo.h.

## ◆ SignalMap

using clang::find_all_symbols::SymbolInfo::SignalMap = std::map<SymbolInfo, Signals>

Definition at line 68 of file SymbolInfo.h.

## Member Enumeration Documentation

## ◆ ContextType

enum clang::find_all_symbols::SymbolInfo::ContextType
| strong

The Context Type.

Enumerator
Namespace |
Record |
EnumDecl |

Definition at line 42 of file SymbolInfo.h.

## ◆ SymbolKind

enum clang::find_all_symbols::SymbolInfo::SymbolKind
| strong

The SymbolInfo Type.

Enumerator
Function |
Class |
Variable |
TypedefName |
EnumDecl |
EnumConstantDecl |
Macro |
Unknown |

Definition at line 30 of file SymbolInfo.h.

## Constructor & Destructor Documentation

## ◆ SymbolInfo() [1/2]

clang::find_all_symbols::SymbolInfo::SymbolInfo | ( |  | ) |
| inline

Definition at line 72 of file SymbolInfo.h.

References Name, and Type.

## ◆ SymbolInfo() [2/2]

clang::find_all_symbols::SymbolInfo::SymbolInfo | ( | llvm::StringRef | Name,
|  | SymbolKind | Type,
|  | llvm::StringRef | FilePath,
|  | const std::vector< Context > & | Contexts
| ) |  |

Definition at line 73 of file SymbolInfo.cpp.

## Member Function Documentation

## ◆ getContexts()

const std::vector<SymbolInfo::Context>& clang::find_all_symbols::SymbolInfo::getContexts | ( |  | ) | const
| inline

Get symbol contexts.

Definition at line 92 of file SymbolInfo.h.

References operator<(), and clang::find_all_symbols::SymbolInfo::Signals::operator==().

Referenced by clang::include_fixer::SymbolIndexManager::search().

## ◆ getFilePath()

llvm::StringRef clang::find_all_symbols::SymbolInfo::getFilePath | ( |  | ) | const
| inline

Get a relative file path where symbol comes from.

Definition at line 89 of file SymbolInfo.h.

Referenced by clang::include_fixer::rank().

## ◆ getName()

llvm::StringRef clang::find_all_symbols::SymbolInfo::getName | ( |  | ) | const
| inline

Get symbol name.

Definition at line 80 of file SymbolInfo.h.

References getQualifiedName().

## ◆ getQualifiedName()

std::string clang::find_all_symbols::SymbolInfo::getQualifiedName | ( |  | ) | const

Get the fully-qualified symbol name.

Definition at line 88 of file SymbolInfo.cpp.

References EnumDecl.

Referenced by getName().

## ◆ getSymbolKind()

SymbolKind clang::find_all_symbols::SymbolInfo::getSymbolKind | ( |  | ) | const
| inline

Get symbol type.

Definition at line 86 of file SymbolInfo.h.

Referenced by clang::include_fixer::SymbolIndexManager::search().

## ◆ operator<()

bool clang::find_all_symbols::SymbolInfo::operator< | ( | const SymbolInfo & | Symbol | ) | const

Definition at line 83 of file SymbolInfo.cpp.

Referenced by getContexts().

## ◆ operator==()

bool clang::find_all_symbols::SymbolInfo::operator== | ( | const SymbolInfo & | Symbol | ) | const

Definition at line 78 of file SymbolInfo.cpp.

## ◆ SetFilePath()

void clang::find_all_symbols::SymbolInfo::SetFilePath | ( | llvm::StringRef | Path | ) |
| inline

Definition at line 77 of file SymbolInfo.h.

References Path.

## Friends And Related Function Documentation

## ◆ llvm::yaml::MappingTraits< struct SymbolAndSignals >

friend struct llvm::yaml::MappingTraits< struct SymbolAndSignals >
| friend

Definition at line 101 of file SymbolInfo.h.

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

- SymbolInfo.h
- SymbolInfo.cpp