Skip to content

SageBuilder::buildVariableDeclaration

Build a fresh, structurally detached variable declaration in an exact semantic scope. A same‐scope declaration with the same name is a hard error; use buildVariableRedeclaration() when the prior declaration is known.

Synopses

Declared in <SageIII/sageInterface/sageBuilder.h>

Build a fresh, structurally detached variable declaration in an exact semantic scope. A same‐scope declaration with the same name is a hard error; use buildVariableRedeclaration() when the prior declaration is known.

[[visibility]]
SgVariableDeclaration*
buildVariableDeclaration(
    SgName const& name,
    SgType* type,
    SgInitializer* varInit,
    SgScopeStatement* scope);
[[visibility]]
SgVariableDeclaration*
buildVariableDeclaration(
    std::string const& name,
    SgType* type,
    SgInitializer* varInit,
    SgScopeStatement* scope);
[[visibility]]
SgVariableDeclaration*
buildVariableDeclaration(
    char const* name,
    SgType* type,
    SgInitializer* varInit,
    SgScopeStatement* scope);

Created with MrDocs