clang-tools 20.0.0git
|
Contains detailed information about a Symbol. More...
#include <Hover.h>
Classes | |
struct | Param |
Represents parameters of a function, a template or a macro. More... | |
struct | PassType |
struct | PrintedType |
Contains pretty-printed type and desugared type. More... | |
Public Member Functions | |
markup::Document | present () const |
Produce a user-readable information. | |
Public Attributes | |
std::optional< std::string > | NamespaceScope |
For a variable named Bar, declared in clang::clangd::Foo::getFoo the following fields will hold: | |
std::string | LocalScope |
Remaining named contexts in symbol's qualified name, empty string means symbol is not local. | |
std::string | Name |
Name of the symbol, does not contain any "::". | |
std::string | Provider |
Header providing the symbol (best match). Contains ""<>. | |
std::optional< Range > | SymRange |
index::SymbolKind | Kind = index::SymbolKind::Unknown |
std::string | Documentation |
std::string | Definition |
Source code containing the definition of the symbol. | |
const char * | DefinitionLanguage = "cpp" |
std::string | AccessSpecifier |
Access specifier for declarations inside class/struct/unions, empty for others. | |
std::optional< PrintedType > | Type |
Printable variable type. | |
std::optional< PrintedType > | ReturnType |
Set for functions and lambdas. | |
std::optional< std::vector< Param > > | Parameters |
Set for functions, lambdas and macros with parameters. | |
std::optional< std::vector< Param > > | TemplateParameters |
Set for all templates(function, class, variable). | |
std::optional< std::string > | Value |
Contains the evaluated value of the symbol if available. | |
std::optional< uint64_t > | Size |
Contains the bit-size of fields and types where it's interesting. | |
std::optional< uint64_t > | Offset |
Contains the offset of fields within the enclosing class. | |
std::optional< uint64_t > | Padding |
Contains the padding following a field within the enclosing class. | |
std::optional< uint64_t > | Align |
Contains the alignment of fields and types where it's interesting. | |
std::optional< Param > | CalleeArgInfo |
std::optional< PassType > | CallPassType |
std::vector< std::string > | UsedSymbolNames |
Contains detailed information about a Symbol.
Especially useful when generating hover responses. It can be rendered as a hover panel, or embedding clients can use the structured information to provide their own UI.
markup::Document clang::clangd::HoverInfo::present | ( | ) | const |
Produce a user-readable information.
Definition at line 1426 of file Hover.cpp.
References AccessSpecifier, Align, clang::clangd::markup::Paragraph::appendCode(), clang::clangd::markup::Paragraph::appendSpace(), clang::clangd::markup::Paragraph::appendText(), CalleeArgInfo, CallPassType, clang::clangd::HoverInfo::PassType::ConstRef, Definition, DefinitionLanguage, Documentation, clang::clangd::formatOffset(), clang::clangd::formatSize(), Kind, LocalScope, Name, NamespaceScope, Offset, OS, Output, Padding, Parameters, clang::clangd::parseDocumentation(), Provider, ReturnType, Size, Type, UsedSymbolNames, Value, and clang::clangd::HoverInfo::PassType::Value.
std::string clang::clangd::HoverInfo::AccessSpecifier |
std::optional<uint64_t> clang::clangd::HoverInfo::Align |
std::optional<Param> clang::clangd::HoverInfo::CalleeArgInfo |
std::optional<PassType> clang::clangd::HoverInfo::CallPassType |
std::string clang::clangd::HoverInfo::Definition |
Source code containing the definition of the symbol.
Definition at line 78 of file Hover.h.
Referenced by clang::clangd::getHover(), and present().
const char* clang::clangd::HoverInfo::DefinitionLanguage = "cpp" |
Definition at line 79 of file Hover.h.
Referenced by clang::clangd::getHover(), and present().
std::string clang::clangd::HoverInfo::Documentation |
index::SymbolKind clang::clangd::HoverInfo::Kind = index::SymbolKind::Unknown |
std::string clang::clangd::HoverInfo::LocalScope |
std::string clang::clangd::HoverInfo::Name |
Name of the symbol, does not contain any "::".
Definition at line 71 of file Hover.h.
Referenced by clang::clangd::getHover(), and present().
std::optional<std::string> clang::clangd::HoverInfo::NamespaceScope |
For a variable named Bar, declared in clang::clangd::Foo::getFoo the following fields will hold:
Definition at line 66 of file Hover.h.
Referenced by present().
std::optional<uint64_t> clang::clangd::HoverInfo::Offset |
std::optional<uint64_t> clang::clangd::HoverInfo::Padding |
std::optional<std::vector<Param> > clang::clangd::HoverInfo::Parameters |
std::string clang::clangd::HoverInfo::Provider |
std::optional<PrintedType> clang::clangd::HoverInfo::ReturnType |
std::optional<uint64_t> clang::clangd::HoverInfo::Size |
std::optional<std::vector<Param> > clang::clangd::HoverInfo::TemplateParameters |
std::optional<PrintedType> clang::clangd::HoverInfo::Type |
std::vector<std::string> clang::clangd::HoverInfo::UsedSymbolNames |
std::optional<std::string> clang::clangd::HoverInfo::Value |