Skip to content

SageBuilder::buildDanglingVarRefExp

Build a variable reference expression without symbol‐table lookup.

Synopsis

Declared in <SageIII/sageInterface/sageBuilder.h>

[[visibility]]
SgVarRefExp*
buildDanglingVarRefExp(
    SgName const& name,
    SgScopeStatement* scope = NULL);

Description

This creates a compiler‐generated placeholder variable declaration (not attached to any statement list and suppressed from code generation) and returns a SgVarRefExp referring to it. This is useful for template‐dependent/unresolved names where binding to an existing symbol by name would be incorrect.

Return Value

This class represents the variable refernece in expressions.

Parameters

Name

Description

name

This class represents strings within the IR nodes.

scope

This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.).

Created with MrDocs