Skip to content

SageBuilder::buildTemplateVariableDeclaration

Build and atomically publish a template variable declaration with explicit structural ownership. The semantic scope is supplied separately; sourceLexicalIn() represents an out-of-class definition without changing the variable entity's semantic class scope.

Synopsis

Declared in <SageIII/sageInterface/sageBuilder.h>

[[visibility("default")]]
SgTemplateVariableDeclaration*
buildTemplateVariableDeclaration(
    declaration_ownership const& ownership,
    SgName const& name,
    SgType* type,
    SgInitializer* varInit,
    SgScopeStatement* scope,
    SgTemplateVariableDeclaration* specializedTemplateDeclaration,
    SgTemplateArgumentPtrList const& semanticArguments,
    SgInitializedName* priorDeclaration = nullptr);

Parameters

Name Description
ownership Exact structural ownership selected by named declaration producers.
name String-backed name value used by AST nodes.
type This class represents the base class for all types.
varInit This class represents the notion of an initializer for a variable declaration or
scope This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.).
priorDeclaration This class represents the notion of a declared variable.

Created with MrDocs