clang-tools 19.0.0git
Public Attributes | List of all members
clang::clangd::SymbolInformation Struct Reference

Represents information about programming constructs like variables, classes, interfaces etc. More...

#include <Protocol.h>

Public Attributes

std::string name
 The name of this symbol.
 
SymbolKind kind
 The kind of this symbol.
 
Location location
 The location of this symbol.
 
std::string containerName
 The name of the symbol containing this symbol.
 
std::optional< float > score
 The score that clangd calculates to rank the returned symbols.
 

Detailed Description

Represents information about programming constructs like variables, classes, interfaces etc.

Definition at line 1128 of file Protocol.h.

Member Data Documentation

◆ containerName

std::string clang::clangd::SymbolInformation::containerName

The name of the symbol containing this symbol.

Definition at line 1139 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), clang::clangd::operator<<(), and clang::clangd::toJSON().

◆ kind

SymbolKind clang::clangd::SymbolInformation::kind

The kind of this symbol.

Definition at line 1133 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), and clang::clangd::toJSON().

◆ location

Location clang::clangd::SymbolInformation::location

The location of this symbol.

Definition at line 1136 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), and clang::clangd::toJSON().

◆ name

std::string clang::clangd::SymbolInformation::name

The name of this symbol.

Definition at line 1130 of file Protocol.h.

Referenced by clang::clangd::flattenSymbolHierarchy(), clang::clangd::operator<<(), and clang::clangd::toJSON().

◆ score

std::optional<float> clang::clangd::SymbolInformation::score

The score that clangd calculates to rank the returned symbols.

This excludes the fuzzy-matching score between name and the query. (Specifically, the last ::-separated component). This can be used to re-rank results as the user types, using client-side fuzzy-matching (that score should be multiplied with this one). This is a clangd extension, set only for workspace/symbol responses.

Definition at line 1147 of file Protocol.h.

Referenced by clang::clangd::toJSON().


The documentation for this struct was generated from the following file: