clang-tools  14.0.0git
Static Public Member Functions | Public Attributes | List of all members
clang::clangd::ASTSignals Struct Reference

Signals derived from a valid AST of a file. More...

#include <ASTSignals.h>

Collaboration diagram for clang::clangd::ASTSignals:
Collaboration graph
[legend]

Static Public Member Functions

static ASTSignals derive (const ParsedAST &AST)
 

Public Attributes

llvm::DenseMap< SymbolID, unsigned > ReferencedSymbols
 Number of occurrences of each symbol present in the file. More...
 
llvm::StringMap< unsigned > RelatedNamespaces
 Namespaces whose symbols are used in the file, and the number of such distinct symbols. More...
 

Detailed Description

Signals derived from a valid AST of a file.

Provides information that can only be extracted from the AST to actions that can't access an AST. The signals are computed and updated asynchronously by the ASTWorker and thus they are always stale and also can be absent. Example usage: Information about the declarations used in a file affects code-completion ranking in that file.

Definition at line 26 of file ASTSignals.h.

Member Function Documentation

◆ derive()

ASTSignals clang::clangd::ASTSignals::derive ( const ParsedAST AST)
static

Definition at line 15 of file ASTSignals.cpp.

Member Data Documentation

◆ ReferencedSymbols

llvm::DenseMap<SymbolID, unsigned> clang::clangd::ASTSignals::ReferencedSymbols

Number of occurrences of each symbol present in the file.

Definition at line 28 of file ASTSignals.h.

Referenced by clang::clangd::SymbolRelevanceSignals::computeASTSignals(), and clang::clangd::SymbolRelevanceSignals::merge().

◆ RelatedNamespaces

llvm::StringMap<unsigned> clang::clangd::ASTSignals::RelatedNamespaces

Namespaces whose symbols are used in the file, and the number of such distinct symbols.

Definition at line 31 of file ASTSignals.h.

Referenced by clang::clangd::SymbolRelevanceSignals::computeASTSignals(), and clang::clangd::SymbolRelevanceSignals::merge().


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