Go to the documentation of this file.
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_HOVER_H
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_HOVER_H
15 #include "clang/Index/IndexSymbol.h"
33 llvm::Optional<std::string>
Type;
35 llvm::Optional<std::string>
Name;
67 llvm::Optional<std::string>
Type;
75 llvm::Optional<std::string>
Value;
77 llvm::Optional<uint64_t>
Size;
109 llvm::raw_ostream &
operator<<(llvm::raw_ostream &,
const HoverInfo::Param &);
117 llvm::Optional<HoverInfo>
getHover(ParsedAST &AST, Position
Pos,
119 const SymbolIndex *
Index);
llvm::Optional< uint64_t > Offset
Contains the offset of fields within the enclosing class.
static cl::opt< std::string > FormatStyle("format-style", cl::desc(R"(
Style for formatting code around applied fixes:
- 'none' (default) turns off formatting
- 'file' (literally 'file', not a placeholder)
uses .clang-format file in the closest parent
directory
- '{ <json> }' specifies options inline, e.g.
-format-style='{BasedOnStyle: llvm, IndentWidth: 8}'
- 'llvm', 'google', 'webkit', 'mozilla'
See clang-format documentation for the up-to-date
information about formatting styles and options.
This option overrides the 'FormatStyle` option in
.clang-tidy file, if any.
)"), cl::init("none"), cl::cat(ClangTidyCategory))
llvm::Optional< PassType > CallPassType
llvm::Optional< HoverInfo > getHover(ParsedAST &AST, Position Pos, format::FormatStyle Style, const SymbolIndex *Index)
Get the hover information when hovering at Pos.
A format-agnostic representation for structured text.
llvm::Optional< std::string > Type
Pretty-printed variable type.
llvm::Optional< std::vector< Param > > Parameters
Set for functions, lambdas and macros with parameters.
llvm::Optional< uint64_t > Size
Contains the byte-size of fields and types where it's interesting.
std::string Name
Name of the symbol, does not contain any "::".
std::string Definition
Source code containing the definition of the symbol.
Contains detailed information about a Symbol.
std::string AccessSpecifier
Access specifier for declarations inside class/struct/unions, empty for others.
llvm::Optional< std::string > Name
None for unnamed parameters.
llvm::Optional< Range > SymRange
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const CodeCompletion &C)
llvm::Optional< std::string > NamespaceScope
For a variable named Bar, declared in clang::clangd::Foo::getFoo the following fields will hold:
llvm::Optional< std::string > Type
The pretty-printed parameter type, e.g.
llvm::Optional< std::string > Default
None if no default is provided.
clang::find_all_symbols::SymbolInfo::SymbolKind SymbolKind
llvm::Optional< std::vector< Param > > TemplateParameters
Set for all templates(function, class, variable).
const SymbolIndex * Index
llvm::Optional< std::string > ReturnType
Set for functions and lambdas.
std::string LocalScope
Remaining named contexts in symbol's qualified name, empty string means symbol is not local.
markup::Document present() const
Produce a user-readable information.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
llvm::Optional< Param > CalleeArgInfo
llvm::Optional< std::string > Value
Contains the evaluated value of the symbol if available.
void parseDocumentation(llvm::StringRef Input, markup::Document &Output)
bool operator==(const Inclusion &LHS, const Inclusion &RHS)
Represents parameters of a function, a template or a macro.
std::string Documentation