clang-tools  17.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...
 
Symbol::IncludeDirective InsertionDirective
 Preferred preprocessor directive to use for inclusions by the file. 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 27 of file ASTSignals.h.

Member Function Documentation

◆ derive()

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

Member Data Documentation

◆ InsertionDirective

Symbol::IncludeDirective clang::clangd::ASTSignals::InsertionDirective
Initial value:
=
Symbol::IncludeDirective::Include

Preferred preprocessor directive to use for inclusions by the file.

Definition at line 34 of file ASTSignals.h.

Referenced by derive().

◆ ReferencedSymbols

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

Number of occurrences of each symbol present in the file.

Definition at line 29 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 32 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: