|
clang-tools 22.0.0git
|
Describes a named symbol from a header. More...
#include <SymbolInfo.h>
Classes | |
| struct | Signals |
Public Types | |
| enum class | SymbolKind { Function , Class , Variable , TypedefName , EnumDecl , EnumConstantDecl , Macro , Unknown } |
| The SymbolInfo Type. More... | |
| enum class | ContextType { Namespace , Record , EnumDecl } |
| The Context Type. More... | |
| typedef std::pair< ContextType, std::string > | Context |
| A pair of <ContextType, ContextName>. | |
| 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. | |
| std::string | getQualifiedName () const |
| Get the fully-qualified symbol name. | |
| SymbolKind | getSymbolKind () const |
| Get symbol type. | |
| llvm::StringRef | getFilePath () const |
| Get a relative file path where symbol comes from. | |
| const std::vector< SymbolInfo::Context > & | getContexts () const |
| Get symbol contexts. | |
| bool | operator< (const SymbolInfo &Symbol) const |
| bool | operator== (const SymbolInfo &Symbol) const |
Friends | |
| struct | llvm::yaml::MappingTraits< struct SymbolAndSignals > |
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 26 of file SymbolInfo.h.
| typedef std::pair<ContextType, std::string> clang::find_all_symbols::SymbolInfo::Context |
A pair of <ContextType, ContextName>.
Definition at line 48 of file SymbolInfo.h.
| using clang::find_all_symbols::SymbolInfo::SignalMap = std::map<SymbolInfo, Signals> |
Definition at line 67 of file SymbolInfo.h.
|
strong |
|
strong |
The SymbolInfo Type.
| Enumerator | |
|---|---|
| Function | |
| Class | |
| Variable | |
| TypedefName | |
| EnumDecl | |
| EnumConstantDecl | |
| Macro | |
| Unknown | |
Definition at line 29 of file SymbolInfo.h.
|
inline |
Definition at line 71 of file SymbolInfo.h.
| clang::find_all_symbols::SymbolInfo::SymbolInfo | ( | llvm::StringRef | Name, |
| SymbolKind | Type, | ||
| llvm::StringRef | FilePath, | ||
| const std::vector< Context > & | Contexts ) |
Definition at line 70 of file SymbolInfo.cpp.
|
inline |
Get symbol contexts.
Definition at line 91 of file SymbolInfo.h.
|
inline |
Get a relative file path where symbol comes from.
Definition at line 88 of file SymbolInfo.h.
|
inline |
Get symbol name.
Definition at line 79 of file SymbolInfo.h.
| std::string clang::find_all_symbols::SymbolInfo::getQualifiedName | ( | ) | const |
Get the fully-qualified symbol name.
Definition at line 85 of file SymbolInfo.cpp.
|
inline |
Get symbol type.
Definition at line 85 of file SymbolInfo.h.
| bool clang::find_all_symbols::SymbolInfo::operator< | ( | const SymbolInfo & | Symbol | ) | const |
Definition at line 80 of file SymbolInfo.cpp.
| bool clang::find_all_symbols::SymbolInfo::operator== | ( | const SymbolInfo & | Symbol | ) | const |
Definition at line 75 of file SymbolInfo.cpp.
|
inline |
Definition at line 76 of file SymbolInfo.h.
|
friend |
Definition at line 97 of file SymbolInfo.h.