Skip to content

SageBuilder

High level SAGE III AST node and subtree builders.

Types

Name

Description

FortranBlockDataBuilderIdentity

Build a Fortran subroutine or procedure

declaration_ownership

Exact structural ownership selected by named declaration producers.

function_declaration_ownership

Exact, typed structural ownership established by function‐declaration builders. Invalid kind/owner combinations cannot be constructed.

template_class_declaration_scopes

Exact semantic and canonical symbol scopes for a template‐class surface.

typedef_declaration_ownership

Build a typedef declaration, such as: typedef int myint; typedef struct A {..} s_A;

Functions

Name

Description

adoptFunctionDeclaratorScope
void adoptFunctionDeclaratorScope(SgFunctionDeclaration* owner, SgDeclarationScope* scope);

Transfer one detached signature scope to its exact function owner.

adoptSourceDeclaratorScope
void adoptSourceDeclaratorScope(SgDeclarationStatement* owner, SgDeclarationScope* scope);

Transfer a detached declarator‐local source scope to its exact non‐function declaration owner. The scope's declarations keep their independent semantic symbol scopes; only structural source ownership changes.

attachAuxiliaryDeclaration
void attachAuxiliaryDeclaration(SgScopeStatement* owner, SgDeclarationStatement* declaration);

Own a semantic‐only declaration without adding it to source emission.

attachSemanticDeclarationScope
void attachSemanticDeclarationScope(SgScopeStatement* owner, SgDeclarationScope* scope);

Attach semantic‐only declaration‐scope infrastructure to its exact structural owner. Both the container and scope must already carry exact semantic provenance; this operation never publishes a physical output owner or reclassifies their subtree.

attachSourceDeclaratorTag
void attachSourceDeclaratorTag(SgDeclarationScope* owner, SgDeclarationStatement* declaration);

Attach a fresh source‐written class/enum declaration to its exact function declarator scope without changing its semantic symbol scope. This is the construction‐time structural transaction used by Clang TypeLoc producers; it does not synthesize source provenance or transfer an existing owner.

beginSourceDeclaratorScopeConstruction
void beginSourceDeclaratorScopeConstruction(SgDeclarationStatement* owner, SgDeclarationScope* scope);

Begin construction of a non‐function declaration whose TypeLoc owns nested source‐written tags. Both nodes must be fresh and the scope must be empty; finishSourceDeclaratorScopeConstruction() hard‐validates the populated source children before the declaration can be published.

buildActualArgumentExpression
SgActualArgumentExpression* buildActualArgumentExpression(SgName arg_name, SgExpression* arg);

Build an Actual Argument Expression

buildActualArgumentExpression_nfi
SgActualArgumentExpression* buildActualArgumentExpression_nfi(SgName arg_name, SgExpression* arg);

buildAddOp
SgAddOp* buildAddOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAddOp_nfi
SgAddOp* buildAddOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAddressOfOp
SgAddressOfOp* buildAddressOfOp(SgExpression* op, SgType* result_type);

buildAddressOfOp_nfi
SgAddressOfOp* buildAddressOfOp_nfi(SgExpression* op, SgType* result_type);

buildAggregateInitializer
SgAggregateInitializer* buildAggregateInitializer(SgExprListExp* initializers, SgType* type, SgAggregateInitializer::aggregate_initializer_source_form_enum source_form);

Build an aggregate initializer

buildAggregateInitializer_nfi
SgAggregateInitializer* buildAggregateInitializer_nfi(SgExprListExp* initializers, SgType* type, SgAggregateInitializer::aggregate_initializer_source_form_enum source_form);

buildAlignOfOp
SgAlignOfOp* buildAlignOfOp(SgExpression* exp, SgType* expression_type);

buildAlignOfOp overloads

buildAlignOfOp_nfi
SgAlignOfOp* buildAlignOfOp_nfi(SgExpression* exp, SgType* expression_type);

buildAndAssignOp
SgAndAssignOp* buildAndAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAndAssignOp_nfi
SgAndAssignOp* buildAndAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAndOp
SgAndOp* buildAndOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAndOp_nfi
SgAndOp* buildAndOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAnonymousStructDeclaration
SgClassDeclaration* buildAnonymousStructDeclaration(declaration_ownership const& ownership, SgName const& internalName, SgScopeStatement* scope);

Build a source‐anonymous structure with an explicit, non‐empty semantic identity. The internal name is never emitted as source.

buildArrayType
SgArrayType* buildArrayType(SgType* base_type, SgExprListExp* dim_info);

buildArrayType overloads

buildArrowExp
SgArrowExp* buildArrowExp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildArrowExp_nfi
SgArrowExp* buildArrowExp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildArrowStarOp
SgArrowStarOp* buildArrowStarOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildArrowStarOp_nfi
SgArrowStarOp* buildArrowStarOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAsmStatement
SgAsmStmt* buildAsmStatement(std::string s);

Build a NULL statement

buildAsmStatement_nfi
SgAsmStmt* buildAsmStatement_nfi(std::string s);

buildAssignInitializer
SgAssignInitializer* buildAssignInitializer(SgExpression* operand_i, SgType* expression_type);

Build the rhs of a variable declaration which includes an assignment

buildAssignInitializer_nfi
SgAssignInitializer* buildAssignInitializer_nfi(SgExpression* operand_i, SgType* expression_type);

buildAssignOp
SgAssignOp* buildAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAssignOp_nfi
SgAssignOp* buildAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildAssignStatement
SgExprStatement* buildAssignStatement(SgExpression* lhs, SgExpression* rhs);

Build an assignment statement from lefthand operand and right hand operand

buildAssignStatement_ast_translate
SgExprStatement* buildAssignStatement_ast_translate(SgExpression* lhs, SgExpression* rhs);

This version does not recursively reset the file info as a transformation.

buildAttributeSpecificationStatement
SgAttributeSpecificationStatement* buildAttributeSpecificationStatement(SgAttributeSpecificationStatement::attribute_spec_enum kind);

Build Fortran attribute specification statement

buildAttributeSpecificationStatement_nfi
SgAttributeSpecificationStatement* buildAttributeSpecificationStatement_nfi(SgAttributeSpecificationStatement::attribute_spec_enum kind);

Build a source‐backed Fortran attribute specification statement whose exact file information will be published by the frontend.

buildAutoType
SgAutoType* buildAutoType();

buildAwaitExpression
SgAwaitExpression* buildAwaitExpression(SgExpression* value, SgType* result_type);

buildAwaitExpression_nfi
SgAwaitExpression* buildAwaitExpression_nfi(SgExpression* value, SgType* result_type);

buildBFloat16Type
SgTypeBFloat16* buildBFloat16Type();

buildBFloat16Val
SgBFloat16Val* buildBFloat16Val(float v = 0);

Build a bfloat16

buildBFloat16Val_nfi
SgBFloat16Val* buildBFloat16Val_nfi(float v, std::string const& str);

buildBaseClass
SgBaseClass* buildBaseClass(SgClassDeclaration* classDeclaration, SgType* sourceType, SgClassDefinition* classDefinition, bool isVirtual, bool isDirect);

DQ (5/6/2013): Added build functions to support SgBaseClass construction.

buildBasicBlock
SgBasicBlock* buildBasicBlock(SgStatement* stmt1 = NULL, SgStatement* stmt2 = NULL, SgStatement* stmt3 = NULL, SgStatement* stmt4 = NULL, SgStatement* stmt5 = NULL, SgStatement* stmt6 = NULL, SgStatement* stmt7 = NULL, SgStatement* stmt8 = NULL, SgStatement* stmt9 = NULL, SgStatement* stmt10 = NULL);

Build a SgBasicBlock, setting file info internally

buildBasicBlock_nfi
SgBasicBlock* buildBasicBlock_nfi();

Build a SgBasicBlock and set its parent. This function does NOT link the parent scope to the block.

buildBinaryConditionalExp
SgConditionalExp* buildBinaryConditionalExp(SgExpression* common, SgExpression* false_expression, SgType* result_type);

Build the GNU omitted‐middle conditional common ?: false_expression. The common operand is represented once and therefore evaluated once.

buildBinaryConditionalExp_nfi
SgConditionalExp* buildBinaryConditionalExp_nfi(SgExpression* common, SgExpression* false_expression, SgType* result_type);

buildBinaryExpression
template<class T> T* buildBinaryExpression(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

Template function to build a binary expression of type T, taking care of parent pointers, file info, lvalue, etc. Available instances include: buildAddOp(), buildAndAssignOp(), buildAndOp(), buildArrowExp(),buildArrowStarOp(),buildAtOp, buildAssignOp(),buildBitAndOp(),buildBitOrOp(),buildBitXorOp(),buildCommaOpExp(), buildConcatenationOp(),buildDivAssignOp(),buildDivideOp(),buildDotExp(),buildEqualityOp(),buildExponentiationOp(),buildGreaterOrEqualOp(),buildGreaterThanOp(),buildIntegerDivideOp(),buildIorAssignOp(),buildLessOrEqualOp(),buildLessThanOp(),buildLshiftAssignOp(),buildLshiftOp(),buildMinusAssignOp(),buildModAssignOp(),buildModOp(),buildMultAssignOp(),buildMultiplyOp(),buildNotEqualOp(),buildOrOp(),buildPlusAssignOp(),buildPntrArrRefExp(),buildRshiftAssignOp(),buildRshiftOp(),buildReplicationOp,buildScopeOp(),buildSubtractOp()buildXorAssignOp() The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros.

buildBinaryExpression_nfi
template<class T> T* buildBinaryExpression_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

Template function to build a binary expression of type T, taking care of parent pointers, but without file‐info. Available instances include: buildAddOp(), buildAndAssignOp(), buildAndOp(), buildArrowExp(),buildArrowStarOp(),buildAtOp, buildAssignOp(),buildBitAndOp(),buildBitOrOp(),buildBitXorOp(),buildCommaOpExp(), buildConcatenationOp(),buildDivAssignOp(),buildDivideOp(),buildDotExp(),buildEqualityOp(),buildExponentiationOp(),buildGreaterOrEqualOp(),buildGreaterThanOp(),buildIntegerDivideOp(),buildIorAssignOp(),buildLessOrEqualOp(),buildLessThanOp(),buildLshiftAssignOp(),buildLshiftOp(),buildMinusAssignOp(),buildModAssignOp(),buildModOp(),buildMultAssignOp(),buildMultiplyOp(),buildNotEqualOp(),buildOrOp(),buildPlusAssignOp(),buildPntrArrRefExp(),buildRshiftAssignOp(),buildRshiftOp(),buildReplicationOp(),buildScopeOp(),buildSubtractOp()buildXorAssignOp() The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros.

buildBitAndOp
SgBitAndOp* buildBitAndOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildBitAndOp_nfi
SgBitAndOp* buildBitAndOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildBitComplementOp
SgBitComplementOp* buildBitComplementOp(SgExpression* op, SgType* result_type);

buildBitComplementOp_nfi
SgBitComplementOp* buildBitComplementOp_nfi(SgExpression* op, SgType* result_type);

buildBitOrOp
SgBitOrOp* buildBitOrOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildBitOrOp_nfi
SgBitOrOp* buildBitOrOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildBitXorOp
SgBitXorOp* buildBitXorOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildBitXorOp_nfi
SgBitXorOp* buildBitXorOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildBoolType
SgTypeBool* buildBoolType();

buildBoolType overloads

buildBoolValExp
SgBoolValExp* buildBoolValExp(bool value = 0);

Build a bool value expression, the name convention of SgBoolValExp is little different from others for some unknown reason

buildBoolValExp_nfi
SgBoolValExp* buildBoolValExp_nfi(int value);

buildBracedInitializer
SgBracedInitializer* buildBracedInitializer(SgExprListExp* initializers, SgType* expression_type);

Build an braced initializer

buildBracedInitializer_nfi
SgBracedInitializer* buildBracedInitializer_nfi(SgExprListExp* initializers, SgType* expression_type);

buildBreakStmt
SgBreakStmt* buildBreakStmt();

Build a break statement

buildBreakStmt_nfi
SgBreakStmt* buildBreakStmt_nfi();

buildCaseOptionStmt
SgCaseOptionStmt* buildCaseOptionStmt(SgExpression* key = NULL, SgStatement* body = NULL);

Build a case option statement

buildCaseOptionStmt_nfi
SgCaseOptionStmt* buildCaseOptionStmt_nfi(SgExpression* key, SgStatement* body);

buildCastExp
SgCastExp* buildCastExp(SgExpression* operand_i, SgType* expression_type);

buildCastExp overloads

buildCastExp_nfi
SgCastExp* buildCastExp_nfi(SgExpression* operand_i, SgType* expression_type);

buildCatchOptionStmt
SgCatchOptionStmt* buildCatchOptionStmt(SgVariableDeclaration* condition = NULL, SgStatement* body = NULL);

Build a catch statement.

buildCatchOptionStmt_nfi
SgCatchOptionStmt* buildCatchOptionStmt_nfi(SgVariableDeclaration* condition = NULL, SgStatement* body = NULL);

buildCatchStatementSeq
SgCatchStatementSeq* buildCatchStatementSeq(SgCatchOptionStmt* = NULL);

Build an initial sequence of Catch blocks containing 0 or 1 element.

buildChar16Type
SgTypeChar16* buildChar16Type();

buildChar16Val
SgChar16Val* buildChar16Val(unsigned short value = 0);

buildChar16Val_nfi
SgChar16Val* buildChar16Val_nfi(unsigned short value, std::string const& str);

buildChar32Type
SgTypeChar32* buildChar32Type();

buildChar32Val
SgChar32Val* buildChar32Val(unsigned int value = 0);

buildChar32Val_nfi
SgChar32Val* buildChar32Val_nfi(unsigned int value, std::string const& str);

buildChar8Type
SgTypeChar8* buildChar8Type();

buildCharType
SgTypeChar* buildCharType();

buildCharVal
SgCharVal* buildCharVal(char value = 0);

buildCharVal_nfi
SgCharVal* buildCharVal_nfi(char value, std::string const& str);

buildChooseExpression
SgChooseExpression* buildChooseExpression(SgExpression* condition, SgExpression* true_expression, SgExpression* false_expression, SgType* result_type);

buildChooseExpression_nfi
SgChooseExpression* buildChooseExpression_nfi(SgExpression* condition, SgExpression* true_expression, SgExpression* false_expression, SgType* result_type);

buildClassDeclaration
SgClassDeclaration* buildClassDeclaration(declaration_ownership const& ownership, SgName name, SgScopeStatement* scope);

DQ (11/7/2009): Added function to build C++ class (builds both the non‐defining and defining declarations; in that order).

buildClassDeclarationStatement_nfi
template<class DeclClass> DeclClass* buildClassDeclarationStatement_nfi(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, SgClassDeclaration* nonDefiningDecl, bool exactScopeOnly);

Build a generic class declaration statement (SgClassDeclaration or subclass) with a class declaration and definition (creating both the defining and nondefining declarations as required.

buildClassDeclaration_nfi
SgClassDeclaration* buildClassDeclaration_nfi(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, SgClassDeclaration* nonDefiningDecl, bool buildTemplateInstantiation, SgTemplateArgumentPtrList* templateArgumentsList, SgName const* templateInstantiationName);

buildClassDefinition
SgClassDefinition* buildClassDefinition(SgClassDeclaration* d = NULL, bool buildTemplateInstantiation = false);

buildClassDefinition_nfi
SgClassDefinition* buildClassDefinition_nfi(SgClassDeclaration* d = NULL, bool buildTemplateInstantiation = false);

buildClassExp
SgClassExp* buildClassExp(SgClassSymbol* sym);

Build class pointer

buildClassExp_nfi
SgClassExp* buildClassExp_nfi(SgClassSymbol* sym);

buildClassNameRefExp
SgClassNameRefExp* buildClassNameRefExp(SgClassSymbol* sym);

buildClassNameRefExp_nfi
SgClassNameRefExp* buildClassNameRefExp_nfi(SgClassSymbol* sym);

buildClassTemplateType
SgClassType* buildClassTemplateType(SgTemplateClassDeclaration* template_decl, std::vector<SgNode*>& template_args);

Some support for building class template instantiation declarations. Note, the template is not actually instantiated, but a `forward declaration' node is created.

buildColonShapeExp
SgColonShapeExp* buildColonShapeExp();

Build a Fortran colon‐shape expression, set file info as the default one.

buildColonShapeExp_nfi
SgColonShapeExp* buildColonShapeExp_nfi();

No file info version of buildColonShapeExp(). File info is to be set later on.

buildCommaOpExp
SgCommaOpExp* buildCommaOpExp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildCommaOpExp_nfi
SgCommaOpExp* buildCommaOpExp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildComment
PreprocessingInfo* buildComment(SgLocatedNode* target, std::string const& content, PreprocessingInfo::DirectiveType commentStyle, PreprocessingInfo::RelativePositionType position = PreprocessingInfo::before);

Build and attach a comment with an explicit lexical comment style. It is a wrapper of SageInterface::attachComment().

buildCommonBlock
SgCommonBlock* buildCommonBlock(SgCommonBlockObject* first_block = NULL);

Build a Fortran Common statement

buildCommonBlockObject
SgCommonBlockObject* buildCommonBlockObject(std::string name = "", SgExprListExp* exp_list = NULL);

Build a Fortran common block, possibly with a name

buildComplexType
SgTypeComplex* buildComplexType(SgType* base_type = nullptr);

Build a complex type

buildComplexVal
SgComplexVal* buildComplexVal(SgExpression* real_value, SgExpression* imaginary_value, SgType* precision_type);

buildComplexVal_nfi
SgComplexVal* buildComplexVal_nfi(SgExpression* real_value, SgExpression* imaginary_value, SgType* precision_type, std::string const& str);

buildCompoundLiteralExp
SgCompoundLiteralExp* buildCompoundLiteralExp(SgVariableSymbol* varSymbol);

buildCompoundLiteralExp_nfi
SgCompoundLiteralExp* buildCompoundLiteralExp_nfi(SgVariableSymbol* varSymbol);

Build function for compound literals (uses a SgVariableSymbol and is similar to buildVarRefExp_nfi()).

buildCompoundRequirement_nfi
SgCompoundRequirement* buildCompoundRequirement_nfi(SgExpression* expression, bool noexcept_required, SgExpression* type_constraint);

buildConcatenationOp
SgConcatenationOp* buildConcatenationOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildConcatenationOp_nfi
SgConcatenationOp* buildConcatenationOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildConditionalExp
SgConditionalExp* buildConditionalExp(SgExpression* test, SgExpression* a, SgExpression* b, SgType* result_type);

Build a conditional expression ?:

buildConditionalExp_nfi
SgConditionalExp* buildConditionalExp_nfi(SgExpression* test, SgExpression* a, SgExpression* b, SgType* t);

buildConjugateOp
SgConjugateOp* buildConjugateOp(SgExpression* op, SgType* result_type);

buildConjugateOp_nfi
SgConjugateOp* buildConjugateOp_nfi(SgExpression* op, SgType* result_type);

buildConstType
SgModifierType* buildConstType(SgType* base_type = nullptr);

Build a const type.

buildConstVolatileModifier
SgConstVolatileModifier* buildConstVolatileModifier(SgConstVolatileModifier::cv_modifier_enum mtype = SgConstVolatileModifier::e_unknown);

Build a const/volatile type qualifier

buildConstVolatileType
SgModifierType* buildConstVolatileType(SgType* base_type = nullptr);

Build a const volatile type.

buildConstructorInitializer
SgConstructorInitializer* buildConstructorInitializer(SgMemberFunctionDeclaration* declaration, SgExprListExp* args, SgType* expression_type, bool need_name, bool need_qualifier, bool need_parenthesis_after_name, bool associated_class_unknown);

buildConstructorInitializer_nfi
SgConstructorInitializer* buildConstructorInitializer_nfi(SgMemberFunctionDeclaration* declaration, SgExprListExp* args, SgType* expression_type, bool need_name, bool need_qualifier, bool need_parenthesis_after_name, bool associated_class_unknown);

buildContinueStmt
SgContinueStmt* buildContinueStmt();

Build a continue statement

buildContinueStmt_nfi
SgContinueStmt* buildContinueStmt_nfi();

buildCpreprocessorDefineDeclaration
PreprocessingInfo* buildCpreprocessorDefineDeclaration(SgLocatedNode* target, std::string const& content, PreprocessingInfo::RelativePositionType position = PreprocessingInfo::before);

Build and attach #define XX directives, pass "#define xxx xxx" as content.

buildCtorInitializerList_nfi
SgCtorInitializerList* buildCtorInitializerList_nfi();

buildCudaKernelCallExp_nfi
SgCudaKernelCallExp* buildCudaKernelCallExp_nfi(SgExpression* kernel, SgExprListExp* parameters = NULL, SgCudaKernelExecConfig* config = NULL);

Build a CUDA kernel call expression (kernel<[config]>(parameters))

buildCudaKernelExecConfig_nfi
SgCudaKernelExecConfig* buildCudaKernelExecConfig_nfi(SgExpression* grid = NULL, SgExpression* blocks = NULL, SgExpression* shared = NULL, SgExpression* stream = NULL);

Build a CUDA kernel execution configuration (<blocks, shared, stream>)

buildDeclType
SgDeclType* buildDeclType(SgExpression* base_expression, SgType* base_type);

Build a decltype reference type

buildDeclarationScope
SgDeclarationScope* buildDeclarationScope();

Build a scope statement. Used to build SgNonrealDecl and SgNonrealType

buildDefaultConstructor
SgMemberFunctionDeclaration* buildDefaultConstructor(function_declaration_ownership const& ownership, SgClassType* classType, SgClassDefinition* classDefinition);

buildDefaultOptionStmt
SgDefaultOptionStmt* buildDefaultOptionStmt(SgStatement* body = NULL);

Build a default option statement

buildDefaultOptionStmt_nfi
SgDefaultOptionStmt* buildDefaultOptionStmt_nfi(SgStatement* body);

buildDefiningClassDeclaration
SgClassDeclaration* buildDefiningClassDeclaration(declaration_ownership const& ownership, SgName name, SgScopeStatement* scope, SgClassDeclaration* nonDefiningDeclaration);

buildDefiningFunctionDeclaration
SgFunctionDeclaration* buildDefiningFunctionDeclaration(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parameter_list, SgScopeStatement* scope, bool forceFreeFunctionScope = false);

Build a function declaration with a function body

buildDefiningMemberFunctionDeclaration
SgMemberFunctionDeclaration* buildDefiningMemberFunctionDeclaration(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parameter_list, SgScopeStatement* scope);

Build a defining ( non‐prototype) member function declaration

buildDefiningTemplateFunctionDeclaration
SgTemplateFunctionDeclaration* buildDefiningTemplateFunctionDeclaration(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parlist, SgScopeStatement* scope, SgTemplateFunctionDeclaration* first_nondefining_declaration, SgTemplateParameterPtrList* definingTemplateParameterList);

buildDefiningTemplateMemberFunctionDeclaration
SgTemplateMemberFunctionDeclaration* buildDefiningTemplateMemberFunctionDeclaration(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parlist, SgScopeStatement* scope, unsigned int functionConstVolatileFlags, SgTemplateMemberFunctionDeclaration* first_nondefing_declaration, SgTemplateParameterPtrList* definingTemplateParameterList);

buildDeleteExp
SgDeleteExp* buildDeleteExp(SgExpression* target, bool is_array = false, bool need_global_specifier = false, SgFunctionDeclaration* deleteOperatorDeclaration = NULL);

Build a delete statement

buildDeleteExp_nfi
SgDeleteExp* buildDeleteExp_nfi(SgExpression* target, bool is_array = false, bool need_global_specifier = false, SgFunctionDeclaration* deleteOperatorDeclaration = NULL);

buildDerivedTypeStatement
SgDerivedTypeStatement* buildDerivedTypeStatement(declaration_ownership const& ownership, SgName const& name, SgScopeStatement* scope);

Build an SgDerivedTypeStatement Fortran derived type declaration with a class declaration and definition (creating both the defining and nondefining declarations as required).

buildDivAssignOp
SgDivAssignOp* buildDivAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDivAssignOp_nfi
SgDivAssignOp* buildDivAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDivideOp
SgDivideOp* buildDivideOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDivideOp_nfi
SgDivideOp* buildDivideOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDoWhileStatement_nfi
void buildDoWhileStatement_nfi(SgDoWhileStmt* result, SgStatement* body, SgStatement* condition);

buildDoWhileStmt
SgDoWhileStmt* buildDoWhileStmt(SgStatement* body, SgExpression* condition);

Build do‐while statement

buildDoWhileStmt_nfi
SgDoWhileStmt* buildDoWhileStmt_nfi(SgStatement* body, SgStatement* condition);

buildDotExp
SgDotExp* buildDotExp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDotExp_nfi
SgDotExp* buildDotExp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDotStarOp
SgDotStarOp* buildDotStarOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDotStarOp_nfi
SgDotStarOp* buildDotStarOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildDoubleType
SgTypeDouble* buildDoubleType();

buildDoubleVal
SgDoubleVal* buildDoubleVal(double value = 0.0);

Build a double value expression

buildDoubleVal_nfi
SgDoubleVal* buildDoubleVal_nfi(double value, std::string const& str);

buildEmptyDeclaration
SgEmptyDeclaration* buildEmptyDeclaration(SgEmptyDeclaration::empty_declaration_role_enum lexicalRole);

Build a detached empty declaration with one explicit lexical role. This builder never consults the ambient scope stack; callers must publish the result through one explicit structural ownership transaction and must distinguish a real ; from a zero‐spelling preprocessing/source anchor.

buildEnumDeclaration
SgEnumDeclaration* buildEnumDeclaration(declaration_ownership const& ownership, SgName const& name, bool isUnNamed, SgScopeStatement* scope);

Build an enum, It is also a declaration statement in SAGE III

buildEnumDeclaration_nfi
SgEnumDeclaration* buildEnumDeclaration_nfi(declaration_ownership const& ownership, SgName const& name, bool isUnNamed, SgScopeStatement* scope, SgEnumDeclaration* canonicalDeclaration);

Build one enum definition over an explicit canonical type identity.

buildEnumVal
SgEnumVal* buildEnumVal(SgEnumFieldSymbol* sym);

buildEnumVal_nfi
SgEnumVal* buildEnumVal_nfi(long long value, SgEnumDeclaration* decl, SgName name);

buildEqualityOp
SgEqualityOp* buildEqualityOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildEqualityOp_nfi
SgEqualityOp* buildEqualityOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildEquivalenceStatement
SgEquivalenceStatement* buildEquivalenceStatement(SgExpression* lhs, SgExpression* rhs);

buildExponentiationAssignOp
SgExponentiationAssignOp* buildExponentiationAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildExponentiationAssignOp_nfi
SgExponentiationAssignOp* buildExponentiationAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildExponentiationOp
SgExponentiationOp* buildExponentiationOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildExponentiationOp_nfi
SgExponentiationOp* buildExponentiationOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildExprListExp
SgExprListExp* buildExprListExp(std::vector<SgExpression*> const& exprs);

Build a SgExprListExp, used for function call parameter list etc.

buildExprListExp_nfi
SgExprListExp* buildExprListExp_nfi();

buildExprStatement
SgExprStatement* buildExprStatement(SgExpression* exp = NULL);

Build a SgExprStatement, set File_Info automatically

buildExprStatement_nfi
SgExprStatement* buildExprStatement_nfi(SgExpression* exp);

buildFile
SgFile* buildFile(std::string const& inputFileName, std::string const& outputFileName, SgProject* project = NULL);

AST high level builders for others

buildFloat128Type
SgTypeFloat128* buildFloat128Type();

buildFloat128Val
SgFloat128Val* buildFloat128Val(long double value = 0.0);

buildFloat128Val_nfi
SgFloat128Val* buildFloat128Val_nfi(long double value, std::string const& str);

buildFloat16Type
SgTypeFloat16* buildFloat16Type();

buildFloat16Val
SgFloat16Val* buildFloat16Val(float v = 0);

Build a float16

buildFloat16Val_nfi
SgFloat16Val* buildFloat16Val_nfi(float v, std::string const& str);

buildFloat32Type
SgTypeFloat32* buildFloat32Type();

buildFloat32Val
SgFloat32Val* buildFloat32Val(float v = 0);

Build a float32

buildFloat32Val_nfi
SgFloat32Val* buildFloat32Val_nfi(float v, std::string const& str);

buildFloat32xType
SgTypeFloat32x* buildFloat32xType();

buildFloat64Type
SgTypeFloat64* buildFloat64Type();

buildFloat64Val
SgFloat64Val* buildFloat64Val(double v = 0);

Build a float64

buildFloat64Val_nfi
SgFloat64Val* buildFloat64Val_nfi(double v, std::string const& str);

buildFloat64xType
SgTypeFloat64x* buildFloat64xType();

buildFloat80Type
SgTypeFloat80* buildFloat80Type();

buildFloat80Val
SgFloat80Val* buildFloat80Val(long double value = 0.0);

buildFloat80Val_nfi
SgFloat80Val* buildFloat80Val_nfi(long double value, std::string const& str);

buildFloatType
SgTypeFloat* buildFloatType();

buildFloatVal
SgFloatVal* buildFloatVal(float value = 0.0);

buildFloatVal_nfi
SgFloatVal* buildFloatVal_nfi(float value = 0.0);

Build a float value expression by converting the string

buildFoldExpression
SgFoldExpression* buildFoldExpression(SgExpression* operands, std::string operator_token_string, bool is_left_associative, SgType* result_type);

buildFoldExpression_nfi
SgFoldExpression* buildFoldExpression_nfi(SgExpression* operands, std::string operator_token_string, bool is_left_associative, SgType* result_type);

buildForInitStatement
SgForInitStatement* buildForInitStatement();

Build a for init statement

buildForInitStatement_nfi
SgForInitStatement* buildForInitStatement_nfi(SgStatementPtrList& statements);

buildForStatement
SgForStatement* buildForStatement(SgStatement* initialize_stmt, SgStatement* test, SgExpression* increment, SgStatement* loop_body);

Build a for statement, assume none of the arguments is NULL

buildForStatement_nfi
SgForStatement* buildForStatement_nfi(SgForInitStatement* init_stmt, SgStatement* test, SgExpression* increment, SgStatement* loop_body);

buildFortranContinueStmt
SgFortranContinueStmt* buildFortranContinueStmt();

Build a Fortran continue statement

buildFortranContinueStmt_nfi
SgFortranContinueStmt* buildFortranContinueStmt_nfi();

buildFortranDo
SgFortranDo* buildFortranDo(SgExpression* initialization, SgExpression* bound, SgExpression* increment, SgBasicBlock* loop_body);

Build a Fortran do construct

buildFortranDo_nfi
SgFortranDo* buildFortranDo_nfi(SgExpression* initialization, SgExpression* bound, SgExpression* increment, SgBasicBlock* loop_body);

buildFortranFunctionRefExp
SgFunctionRefExp* buildFortranFunctionRefExp(SgFunctionSymbol* semantic_symbol, SgFunctionSymbol* source_visible_symbol, SgFunctionRefExp::fortran_source_visible_binding_kind_enum kind);

Build a Fortran function reference with separate resolved‐procedure and source‐visible binding identities.

buildFortranFunctionRefExp_nfi
SgFunctionRefExp* buildFortranFunctionRefExp_nfi(SgFunctionSymbol* semantic_symbol, SgFunctionSymbol* source_visible_symbol, SgFunctionRefExp::fortran_source_visible_binding_kind_enum kind);

buildFortranImplicitType
SgType* buildFortranImplicitType(SgName name);

Build a type based on Fortran's implicit typing rules. Currently this interface does not take into account possible implicit statements that change the rules.

buildFortranIncludeLine
SgFortranIncludeLine* buildFortranIncludeLine(std::string filename);

Build Fortran include line

buildFortranIncludeLine_nfi
SgFortranIncludeLine* buildFortranIncludeLine_nfi(std::string filename);

buildFortranKindType
SgModifierType* buildFortranKindType(SgType* base_type, SgExpression* kindExpression);

Build a type based on the Fortran kind mechanism

buildFp16Type
SgTypeFp16* buildFp16Type();

buildFriendTypeDeclaration
SgFriendTypeDeclaration* buildFriendTypeDeclaration(SgType* friend_type);

Build a C++11 type‐only friend declaration, such as friend T;.

buildFunctionCallExp
SgFunctionCallExp* buildFunctionCallExp(SgFunctionSymbol* sym, SgExprListExp* parameters = NULL);

buildFunctionCallExp overloads

buildFunctionCallExp_nfi
SgFunctionCallExp* buildFunctionCallExp_nfi(SgExpression* f, SgType* result_type, SgExprListExp* parameters = NULL);

buildFunctionCallStmt
SgExprStatement* buildFunctionCallStmt(SgExpression* function, SgType* result_type, SgExprListExp* parameters = NULL);

buildFunctionCallStmt overloads

buildFunctionParameterList
SgFunctionParameterList* buildFunctionParameterList(SgFunctionParameterTypeList* paraTypeList);

buildFunctionParameterList overloads

buildFunctionParameterList_nfi
SgFunctionParameterList* buildFunctionParameterList_nfi();

buildFunctionParameterRefExp
SgFunctionParameterRefExp* buildFunctionParameterRefExp(int parameter_number, int parameter_level, SgType* parameter_type);

buildFunctionParameterRefExp_nfi
SgFunctionParameterRefExp* buildFunctionParameterRefExp_nfi(int parameter_number, int parameter_level, SgType* parameter_type);

buildFunctionParameterTypeList
SgFunctionParameterTypeList* buildFunctionParameterTypeList(SgExprListExp* expList);

buildFunctionParameterTypeList overloads

buildFunctionParameterTypeList_nfi
SgFunctionParameterTypeList* buildFunctionParameterTypeList_nfi(SgExprListExp* expList);

buildFunctionRefExp
SgFunctionRefExp* buildFunctionRefExp(SgFunctionSymbol* sym);

buildFunctionRefExp overloads

buildFunctionRefExp_nfi
SgFunctionRefExp* buildFunctionRefExp_nfi(SgFunctionSymbol* sym);

buildFunctionType
SgFunctionType* buildFunctionType(SgType* return_type, SgFunctionParameterList* argList);

buildFunctionType overloads

buildGeneratedFunctionParameterList
SgFunctionParameterList* buildGeneratedFunctionParameterList(SgFunctionParameterList const* sourceParameters);

Build an independent generated prototype signature from an existing parameter list. Default arguments remain owned by the source declaration; the result contains fresh transformation identities with the same names, types, pack roles, and qualification metadata. This is the generated‐source counterpart to buildSemanticFunctionParameterList().

buildGeneratedSourceFile
SgSourceFile* buildGeneratedSourceFile(std::string const& outputFileName, SgProject* project = NULL);

Build an output‐only SgSourceFile node and attach it to SgProject The file is constructed with an empty global scope without creating an input file or invoking a frontend. The output filename is canonicalized to one absolute translation‐unit identity before construction and determines the source language. The same identity owns the file command line, source positions, and unparse output. If project is null, a new SgProject is created and can be retrieved with SgFile::get_project().

buildGotoStatement
SgGotoStatement* buildGotoStatement(SgLabelStatement* label = NULL);

buildGotoStatement overloads

buildGotoStatement_nfi
SgGotoStatement* buildGotoStatement_nfi(SgExpression* expr);

Build a goto statement from a label expression, supporting only C/C++ and not Fortran cases

buildGreaterOrEqualOp
SgGreaterOrEqualOp* buildGreaterOrEqualOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildGreaterOrEqualOp_nfi
SgGreaterOrEqualOp* buildGreaterOrEqualOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildGreaterThanOp
SgGreaterThanOp* buildGreaterThanOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildGreaterThanOp_nfi
SgGreaterThanOp* buildGreaterThanOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildIfStmt
SgIfStmt* buildIfStmt(SgExpression* conditional, SgStatement* true_body, SgStatement* false_body);

Build if statement

buildIfStmt_nfi
SgIfStmt* buildIfStmt_nfi(SgStatement* conditional, SgStatement* true_body, SgStatement* false_body);

buildImagPartOp
SgImagPartOp* buildImagPartOp(SgExpression* op, SgType* result_type);

buildImagPartOp_nfi
SgImagPartOp* buildImagPartOp_nfi(SgExpression* op, SgType* result_type);

buildImaginaryType
SgTypeImaginary* buildImaginaryType(SgType* base_type = nullptr);

Build an imaginary type

buildImaginaryVal
SgComplexVal* buildImaginaryVal(long double imaginary_value);

buildImaginaryVal_nfi
SgComplexVal* buildImaginaryVal_nfi(SgExpression* imaginary_value, SgType* precision_type, std::string const& str);

buildInitializedName
SgInitializedName* buildInitializedName(std::string const& name, SgType* type);

e.g the scope of arguments of functions are different for defining and nondefining functions.

buildInitializedName_nfi
SgInitializedName* buildInitializedName_nfi(SgName const& name, SgType* type, SgInitializer* init, SgVariableDeclaration* declptr = NULL);

buildIntType
SgTypeInt* buildIntType();

buildIntVal
SgIntVal* buildIntVal(int value = 0);

Build an integer value expression

buildIntValHex
SgIntVal* buildIntValHex(int value = 0);

buildIntVal_nfi
SgIntVal* buildIntVal_nfi(int value = 0);

Build an integer value expression by converting the string

buildIntegerDivideAssignOp
SgIntegerDivideAssignOp* buildIntegerDivideAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildIntegerDivideAssignOp_nfi
SgIntegerDivideAssignOp* buildIntegerDivideAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildIntegerDivideOp
SgIntegerDivideOp* buildIntegerDivideOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildIntegerDivideOp_nfi
SgIntegerDivideOp* buildIntegerDivideOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildIorAssignOp
SgIorAssignOp* buildIorAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildIorAssignOp_nfi
SgIorAssignOp* buildIorAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLabelRefExp
SgLabelRefExp* buildLabelRefExp(SgLabelSymbol* s);

Build a Fortran numeric label ref exp

buildLabelStatement
SgLabelStatement* buildLabelStatement(SgName const& name, SgStatement* stmt, SgScopeStatement* scope = NULL);

Note that the scope of a label statement is special. It is SgFunctionDefinition, not the closest scope statement such as SgBasicBlock.

buildLabelStatement_nfi
SgLabelStatement* buildLabelStatement_nfi(SgName const& name, SgStatement* stmt, SgScopeStatement* scope);

buildLambdaCapture
SgLambdaCapture* buildLambdaCapture(SgExpression* capture_variable, SgExpression* source_closure_variable, SgExpression* closure_variable);

buildLambdaCaptureList
SgLambdaCaptureList* buildLambdaCaptureList();

buildLambdaCaptureList_nfi
SgLambdaCaptureList* buildLambdaCaptureList_nfi();

buildLambdaCapture_nfi
SgLambdaCapture* buildLambdaCapture_nfi(SgExpression* capture_variable, SgExpression* source_closure_variable, SgExpression* closure_variable);

buildLambdaExp
SgLambdaExp* buildLambdaExp(SgLambdaCaptureList* lambda_capture_list, SgClassDeclaration* lambda_closure_class, SgFunctionDeclaration* lambda_function);

DQ (9/3/2014): Adding support for C++11 Lambda expressions

buildLambdaExp_nfi
SgLambdaExp* buildLambdaExp_nfi(SgLambdaCaptureList* lambda_capture_list, SgClassDeclaration* lambda_closure_class, SgFunctionDeclaration* lambda_function);

buildLessOrEqualOp
SgLessOrEqualOp* buildLessOrEqualOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLessOrEqualOp_nfi
SgLessOrEqualOp* buildLessOrEqualOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLessThanOp
SgLessThanOp* buildLessThanOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLessThanOp_nfi
SgLessThanOp* buildLessThanOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLongDoubleType
SgTypeLongDouble* buildLongDoubleType();

buildLongDoubleVal
SgLongDoubleVal* buildLongDoubleVal(long double value = 0.0);

buildLongDoubleVal_nfi
SgLongDoubleVal* buildLongDoubleVal_nfi(long double value, std::string const& str);

buildLongIntVal
SgLongIntVal* buildLongIntVal(long value = 0);

Build a long integer value expression

buildLongIntValHex
SgLongIntVal* buildLongIntValHex(long value = 0);

buildLongIntVal_nfi
SgLongIntVal* buildLongIntVal_nfi(long value, std::string const& str);

buildLongLongIntVal
SgLongLongIntVal* buildLongLongIntVal(long long value = 0);

Build a long long integer value expression

buildLongLongIntValHex
SgLongLongIntVal* buildLongLongIntValHex(long long value = 0);

buildLongLongIntVal_nfi
SgLongLongIntVal* buildLongLongIntVal_nfi(long long value, std::string const& str);

buildLongLongType
SgTypeLongLong* buildLongLongType();

buildLongType
SgTypeLong* buildLongType();

buildLshiftAssignOp
SgLshiftAssignOp* buildLshiftAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLshiftAssignOp_nfi
SgLshiftAssignOp* buildLshiftAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLshiftOp
SgLshiftOp* buildLshiftOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildLshiftOp_nfi
SgLshiftOp* buildLshiftOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildMemberFunctionCall
SgFunctionCallExp* buildMemberFunctionCall(SgExpression* objectExpression, SgMemberFunctionSymbol* functionSymbol, SgExprListExp* params);

buildMemberFunctionCall overloads

buildMemberFunctionRefExp
SgMemberFunctionRefExp* buildMemberFunctionRefExp(SgMemberFunctionSymbol* sym, bool virtual_call, bool need_qualifier);

buildMemberFunctionRefExp_nfi
SgMemberFunctionRefExp* buildMemberFunctionRefExp_nfi(SgMemberFunctionSymbol* sym, bool virtual_call, bool need_qualifier);

buildMemberFunctionType
SgMemberFunctionType* buildMemberFunctionType(SgType* return_type, SgFunctionParameterTypeList* typeList, SgScopeStatement* struct_name, unsigned int mfunc_specifier);

DQ (8/19/2012): Refactored some of the code supporting construction of the SgMemberFunctionType.

buildMinusAssignOp
SgMinusAssignOp* buildMinusAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildMinusAssignOp_nfi
SgMinusAssignOp* buildMinusAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildMinusMinusOp
SgMinusMinusOp* buildMinusMinusOp(SgExpression* op, SgType* result_type);

buildMinusMinusOp_nfi
SgMinusMinusOp* buildMinusMinusOp_nfi(SgExpression* op, SgType* result_type);

buildMinusOp
SgMinusOp* buildMinusOp(SgExpression* op, SgType* result_type);

Build ‐‐ expression, Sgop_mode is a value of either SgUnaryOp::prefix or SgUnaryOp::postfix

buildMinusOp_nfi
SgMinusOp* buildMinusOp_nfi(SgExpression* op, SgType* result_type);

buildModAssignOp
SgModAssignOp* buildModAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildModAssignOp_nfi
SgModAssignOp* buildModAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildModOp
SgModOp* buildModOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildModOp_nfi
SgModOp* buildModOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildModifierType
SgModifierType* buildModifierType(SgType* base_type, SgTypeModifier const& modifier);

Build a modifier type.

buildModuleStatement
SgModuleStatement* buildModuleStatement(declaration_ownership const& ownership, SgName const& name, SgScopeStatement* scope);

Build a Fortran module declaration.

buildMultAssignOp
SgMultAssignOp* buildMultAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildMultAssignOp_nfi
SgMultAssignOp* buildMultAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildMultibyteNopStatement
SgAsmStmt* buildMultibyteNopStatement(int n);

DQ (4/30/2010): Added support for building nop statement using asm statement Building nop statement using asm statement

buildMultiplyOp
SgMultiplyOp* buildMultiplyOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildMultiplyOp_nfi
SgMultiplyOp* buildMultiplyOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildNamespaceAliasDeclarationStatement
SgNamespaceAliasDeclarationStatement* buildNamespaceAliasDeclarationStatement(declaration_ownership const& ownership, SgName const& name, SgNamespaceDeclarationStatement* namespaceDeclaration, SgScopeStatement* scope);

buildNamespaceDeclaration
SgNamespaceDeclarationStatement* buildNamespaceDeclaration(SgName const& name, SgScopeStatement* scope);

tps (09/02/2009) : Added support for building namespaces

buildNamespaceDeclaration_nfi
SgNamespaceDeclarationStatement* buildNamespaceDeclaration_nfi(SgName const& name, bool unnamednamespace, SgScopeStatement* scope, namespace_declaration_ownership_enum ownership, SgNamespaceSourceFragment* openingIntroducerFragment, SgNamespaceSourceFragment* openingFragment, SgNamespaceSourceFragment* closingFragment, std::optional<unsigned int> sourceOrder);

Build one namespace declaration with explicit semantic and lexical ownership. Source‐lexical declarations require source‐spelled fragments and a positive producer‐wide namespace order in the final expanded token stream; generated and semantic‐only declarations require no order.

buildNamespaceDefinition
SgNamespaceDefinitionStatement* buildNamespaceDefinition(SgNamespaceDeclarationStatement* d = NULL);

buildNamespaceDefinition_nfi
SgNamespaceDefinitionStatement* buildNamespaceDefinition_nfi(SgNamespaceDeclarationStatement* d = NULL);

buildNestedRequirement_nfi
SgNestedRequirement* buildNestedRequirement_nfi(SgExpression* constraint);

buildNewExp
SgNewExp* buildNewExp(SgType* type, SgExprListExp* exprListExp, SgConstructorInitializer* constInit, SgExpression* expr, short val, SgFunctionDeclaration* funcDecl);

buildNewExp_nfi
SgNewExp* buildNewExp_nfi(SgType* type, SgExprListExp* exprListExp, SgConstructorInitializer* constInit, SgExpression* expr, short val, SgFunctionDeclaration* funcDecl);

buildNoexceptOp
SgNoexceptOp* buildNoexceptOp(SgExpression* exp = NULL);

Build noexcept operator expression with an expression parameter

buildNoexceptOp_nfi
SgNoexceptOp* buildNoexceptOp_nfi(SgExpression* exp);

buildNondefiningClassDeclaration
SgClassDeclaration* buildNondefiningClassDeclaration(declaration_ownership const& ownership, SgName name, SgScopeStatement* scope);

DQ (11/7/2009): Added functions to build C++ class.

buildNondefiningClassDeclaration_nfi
SgClassDeclaration* buildNondefiningClassDeclaration_nfi(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, SgTemplateClassDeclaration* templateDeclaration, SgTemplateArgumentPtrList* templateArgumentsList, SgName const* templateInstantiationNameOverride, bool anonymousInternalIdentity = false);

Build a class first nondefining declaration, without file info.

buildNondefiningDerivedTypeStatement
SgDerivedTypeStatement* buildNondefiningDerivedTypeStatement(declaration_ownership const& ownership, SgName const& name, SgScopeStatement* scope);

Build the canonical semantic forward declaration for a Fortran derived type. A derived‐type forward has no source surface or definition and must be completed later by exactly one buildDerivedTypeStatement() call.

buildNondefiningEnumDeclaration_nfi
SgEnumDeclaration* buildNondefiningEnumDeclaration_nfi(SgName const& name, bool isUnNamed, SgScopeStatement* scope, declaration_ownership const& ownership, SgEnumType* sharedTypeIdentity);

Build an enum first nondefining declaration, without file info

buildNondefiningFunctionDeclaration
SgFunctionDeclaration* buildNondefiningFunctionDeclaration(function_declaration_ownership const& ownership, SgFunctionDeclaration const* funcdecl, SgScopeStatement* scope);

buildNondefiningFunctionDeclaration overloads

buildNondefiningMemberFunctionDeclaration
SgMemberFunctionDeclaration* buildNondefiningMemberFunctionDeclaration(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parameter_list, SgScopeStatement* scope);

Build a prototype member function declaration

buildNondefiningProcedureHeaderStatement
SgProcedureHeaderStatement* buildNondefiningProcedureHeaderStatement(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* param_list, SgProcedureHeaderStatement::subprogram_kind_enum, SgProcedureHeaderStatement::fortran_procedure_source_form_enum source_form, SgScopeStatement* scope, FortranBlockDataBuilderIdentity const* block_data_identity = nullptr);

Build a nondefining SgProcedureHeaderStatement, handle function type, symbol etc transparently

buildNondefiningTemplateClassDeclaration
SgTemplateClassDeclaration* buildNondefiningTemplateClassDeclaration(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, template_class_declaration_scopes const& scopes, SgTemplateParameterPtrList* templateParameterList, SgTemplateArgumentPtrList* templateSpecializationArgumentList, SgName const* templateSpecializationNameOverride);

buildNondefiningTemplateClassDeclaration()

buildNondefiningTemplateClassDeclaration_nfi
SgTemplateClassDeclaration* buildNondefiningTemplateClassDeclaration_nfi(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, template_class_declaration_scopes const& scopes, SgTemplateParameterPtrList* templateParameterList, SgTemplateArgumentPtrList* templateSpecializationArgumentList, SgName const* templateSpecializationNameOverride);

DQ (11/29/2011): Adding template declaration support to the AST.

buildNondefiningTemplateClassRedeclaration_nfi
SgTemplateClassDeclaration* buildNondefiningTemplateClassRedeclaration_nfi(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, template_class_declaration_scopes const& scopes, SgTemplateClassDeclaration* canonicalDeclaration, SgTemplateParameterPtrList* templateParameterList, SgTemplateArgumentPtrList* templateSpecializationArgumentList, SgName const* templateSpecializationNameOverride);

Build one nondefining redeclaration of an existing template class. The canonical declaration is required explicitly; the redeclaration reuses its exact type and symbol and never publishes another symbol.

buildNondefiningTemplateFunctionDeclaration
SgTemplateFunctionDeclaration* buildNondefiningTemplateFunctionDeclaration(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parlist, SgScopeStatement* scope, SgTemplateParameterPtrList* templateParameterList = NULL);

buildNondefiningTemplateMemberFunctionDeclaration
SgTemplateMemberFunctionDeclaration* buildNondefiningTemplateMemberFunctionDeclaration(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parlist, SgScopeStatement* scope, unsigned int functionConstVolatileFlags, SgTemplateParameterPtrList* templateParameterList, SgTemplateParameterPtrList* symbolIdentityTemplateParameterList);

buildNonrealBaseClass
SgNonrealBaseClass* buildNonrealBaseClass(SgNonrealDecl* classDeclaration, SgType* sourceType, SgClassDefinition* classDefinition, bool isVirtual, bool isDirect);

buildNonrealDecl
SgNonrealDecl* buildNonrealDecl(SgName const& name, SgDeclarationScope* scope, SgDeclarationScope* child_scope = NULL);

Build a declaration of a non‐real class or class‐member in an explicit, non‐null lexical declaration scope. A null child scope requests creation of a new owned child declaration scope.

buildNonrealRefExp_nfi
SgNonrealRefExp* buildNonrealRefExp_nfi(SgNonrealSymbol* sym);

Build a reference to the non‐real declaration of a member of a non‐real class

buildNonrealType
SgNonrealType* buildNonrealType(SgName const& name, SgDeclarationScope* scope);

Build a non real type used for template parameter. Internally a SgNorealDecl is also built.

buildNotEqualOp
SgNotEqualOp* buildNotEqualOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildNotEqualOp_nfi
SgNotEqualOp* buildNotEqualOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildNotOp
SgNotOp* buildNotOp(SgExpression* op, SgType* result_type);

buildNotOp_nfi
SgNotOp* buildNotOp_nfi(SgExpression* op, SgType* result_type);

buildNullExpression
SgNullExpression* buildNullExpression(SgNullExpression::null_expression_role_enum role);

Build a typed null‐expression placeholder, set file info as the default one.

buildNullExpression_nfi
SgNullExpression* buildNullExpression_nfi(SgNullExpression::null_expression_role_enum role);

No file info version of buildNullExpression(). File info is to be set later on.

buildNullStatement
SgNullStatement* buildNullStatement();

Build a NULL statement

buildNullStatement_nfi
SgNullStatement* buildNullStatement_nfi();

buildNullptrType
SgTypeNullptr* buildNullptrType();

buildNullptrValExp
SgNullptrValExp* buildNullptrValExp();

DQ (7/31/2014): Adding support for C++11 nullptr const value expressions.

buildNullptrValExp_nfi
SgNullptrValExp* buildNullptrValExp_nfi();

buildOrOp
SgOrOp* buildOrOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildOrOp_nfi
SgOrOp* buildOrOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildPackExpansionExpr
SgPackExpansionExpr* buildPackExpansionExpr(SgExpression* pattern, SgType* result_type);

buildPackExpansionExpr_nfi
SgPackExpansionExpr* buildPackExpansionExpr_nfi(SgExpression* pattern, SgType* result_type);

buildPlusAssignOp
SgPlusAssignOp* buildPlusAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildPlusAssignOp_nfi
SgPlusAssignOp* buildPlusAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildPlusPlusOp
SgPlusPlusOp* buildPlusPlusOp(SgExpression* op, SgType* result_type);

Build ++x or x++ , specify prefix or postfix using either SgUnaryOp::prefix or SgUnaryOp::postfix

buildPlusPlusOp_nfi
SgPlusPlusOp* buildPlusPlusOp_nfi(SgExpression* op, SgType* result_type);

buildPntrArrRefExp
SgPntrArrRefExp* buildPntrArrRefExp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildPntrArrRefExp_nfi
SgPntrArrRefExp* buildPntrArrRefExp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildPointerDerefExp
SgPointerDerefExp* buildPointerDerefExp(SgExpression* op, SgType* result_type);

buildPointerDerefExp_nfi
SgPointerDerefExp* buildPointerDerefExp_nfi(SgExpression* op, SgType* result_type);

buildPointerMemberType
SgPointerMemberType* buildPointerMemberType(SgType* base_type, SgType* classType);

Pei‐Hung (06/30/2023): support for SgPointerMemberType

buildPointerType
SgPointerType* buildPointerType(SgType* base_type = nullptr);

Build a pointer type

buildPragma
SgPragma* buildPragma(std::string const& name);

Build SgPragma

buildPragmaDeclaration
SgPragmaDeclaration* buildPragmaDeclaration(std::string const& name, SgScopeStatement* scope = NULL);

Build pragma declaration, handle SgPragma and defining/nondefining pointers internally

buildPragmaDeclaration_nfi
SgPragmaDeclaration* buildPragmaDeclaration_nfi(std::string const& name, SgScopeStatement* scope);

buildProcedureHeaderStatement
SgProcedureHeaderStatement* buildProcedureHeaderStatement(function_declaration_ownership const& ownership, SgName const& name, SgType* return_type, SgFunctionParameterList* parameter_list, SgFunctionParameterList* canonical_parameter_list, SgProcedureHeaderStatement::subprogram_kind_enum, SgProcedureHeaderStatement::fortran_procedure_source_form_enum source_form, SgScopeStatement* scope);

Build a defining Fortran procedure with an explicit lexical source form.

buildProcedureHeaderStatementFromExactDefinition
SgProcedureHeaderStatement* buildProcedureHeaderStatementFromExactDefinition(function_declaration_ownership const& ownership, SgFunctionDefinition* exact_definition, char const* name, SgType* return_type, SgFunctionParameterList* parlist, SgProcedureHeaderStatement::subprogram_kind_enum, SgProcedureHeaderStatement::fortran_procedure_source_form_enum source_form, SgScopeStatement* scope, SgProcedureHeaderStatement* first_nondefining_declaration, FortranBlockDataBuilderIdentity const* block_data_identity = nullptr);

Complete a bottom‐up Fortran procedure construction around its exact preconstructed definition and body. The definition is consumed exactly once and must already carry final source classification and scope identity.

buildRangeBasedForStatement_nfi
SgRangeBasedForStatement* buildRangeBasedForStatement_nfi(SgVariableDeclaration* initializer, SgVariableDeclaration* range, SgVariableDeclaration* begin_declaration, SgVariableDeclaration* end_declaration, SgExpression* not_equal_expression, SgExpression* increment_expression, SgStatement* body);

buildRangeExp
SgRangeExp* buildRangeExp(SgExpression* start);

buildRangeExp_nfi
SgRangeExp* buildRangeExp_nfi(SgExpression* start, SgExpression* end, SgExpression* stride);

buildRealPartOp
SgRealPartOp* buildRealPartOp(SgExpression* op, SgType* result_type);

buildRealPartOp_nfi
SgRealPartOp* buildRealPartOp_nfi(SgExpression* op, SgType* result_type);

buildReferenceType
SgReferenceType* buildReferenceType(SgType* base_type = nullptr);

Build a reference type

buildRequirementSubstitutionFailure_nfi
SgRequirementSubstitutionFailure* buildRequirementSubstitutionFailure_nfi(SgRequirementSubstitutionFailure::failure_kind_enum failure_kind, std::string const& substituted_entity, std::string const& diagnostic_message);

buildRequiresExpr
SgRequiresExpr* buildRequiresExpr(SgFunctionParameterList* local_parameter_list, SgExprListExp* requirements);

buildRequiresExpr_nfi
SgRequiresExpr* buildRequiresExpr_nfi(SgFunctionParameterList* local_parameter_list, SgExprListExp* requirements);

buildRestrictType
SgModifierType* buildRestrictType(SgType* base_type);

Build a restrict type.

buildReturnStmt
SgReturnStmt* buildReturnStmt(SgExpression* expression = NULL);

Build a return statement

buildReturnStmt_nfi
SgReturnStmt* buildReturnStmt_nfi(SgExpression* expression);

buildRshiftAssignOp
SgRshiftAssignOp* buildRshiftAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildRshiftAssignOp_nfi
SgRshiftAssignOp* buildRshiftAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildRshiftOp
SgRshiftOp* buildRshiftOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildRshiftOp_nfi
SgRshiftOp* buildRshiftOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildRvalueReferenceType
SgRvalueReferenceType* buildRvalueReferenceType(SgType* base_type);

Build a rvalue reference type

buildScopeOp
SgScopeOp* buildScopeOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildScopeOp_nfi
SgScopeOp* buildScopeOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildSemanticAuxiliaryVariableDeclaration
SgVariableDeclaration* buildSemanticAuxiliaryVariableDeclaration(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope);

Build and publish one named semantic‐only variable declaration under the scope's exact auxiliary owner. Structural ownership is established before the variable symbol is inserted, so copied scope symbol tables can map the symbol only to an attached declaration basis.

buildSemanticFunctionParameterList
SgFunctionParameterList* buildSemanticFunctionParameterList(SgFunctionParameterList const* sourceParameters);

Build an independent semantic‐only signature from an existing parameter list. Default arguments remain owned by the source declaration; the result contains fresh parameter identities with the same names, types, pack roles, and qualification metadata.

buildSemanticInitializedName
SgInitializedName* buildSemanticInitializedName(SgName const& name, SgType* type, SgInitializer* init = NULL, SgVariableDeclaration* declptr = NULL);

Build an initialized name that has no independently written source surface. The result is classified and validated as exact frontend semantic output at this producer; callers must not repair its provenance after attachment.

buildSemanticMemberFunctionRefExp
SgMemberFunctionRefExp* buildSemanticMemberFunctionRefExp(SgMemberFunctionSymbol* sym, bool virtual_call, bool need_qualifier);

buildSemanticNonrealType
SgNonrealType* buildSemanticNonrealType(SgName const& name, SgScopeStatement* scope, SgTemplateArgumentPtrList const* tplArgs, SgName const* semanticName);

Build a semantic non‐real dependent type (optionally with template arguments). Every structurally owned located template‐argument node must be unclassified or already have exact compiler‐generated semantic provenance. Internally a SgNonrealDecl is also built.

buildShortType
SgTypeShort* buildShortType();

buildShortVal
SgShortVal* buildShortVal(short value = 0);

buildShortValHex
SgShortVal* buildShortValHex(short value = 0);

buildShortVal_nfi
SgShortVal* buildShortVal_nfi(short value, std::string const& str);

buildSigned128bitIntegerType
SgTypeSigned128bitInteger* buildSigned128bitIntegerType();

buildSignedCharType
SgTypeSignedChar* buildSignedCharType();

buildSignedCharVal
SgSignedCharVal* buildSignedCharVal(signed char v = 0);

Build a signed char

buildSignedCharValHex
SgSignedCharVal* buildSignedCharValHex(signed char v = 0);

buildSignedCharVal_nfi
SgSignedCharVal* buildSignedCharVal_nfi(signed char v, std::string const& str);

buildSignedIntType
SgTypeSignedInt* buildSignedIntType();

buildSignedLongLongType
SgTypeSignedLongLong* buildSignedLongLongType();

buildSignedLongType
SgTypeSignedLong* buildSignedLongType();

buildSignedShortType
SgTypeSignedShort* buildSignedShortType();

buildSimpleRequirement_nfi
SgSimpleRequirement* buildSimpleRequirement_nfi(SgExpression* expression);

buildSizeOfOp
SgSizeOfOp* buildSizeOfOp(SgExpression* exp, SgType* expression_type);

buildSizeOfOp overloads

buildSizeOfOp_nfi
SgSizeOfOp* buildSizeOfOp_nfi(SgExpression* exp, SgType* expression_type);

buildSourceFile
SgSourceFile* buildSourceFile(std::string const& inputFileName, std::string const& outputFileName, SgProject* project);

Build a SgSourceFile node and attach it to SgProject The input file will be loaded if exists, or an empty one will be generated from scratch transparently. Output file name is used to specify the output file name of unparsing. The final SgFile will be inserted to project automatically. If not provided, a new SgProject will be generated internally. Using SgFile‐>get_project() to retrieve it in this case.

buildSpaceshipOp
SgSpaceshipOp* buildSpaceshipOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildSpaceshipOp_nfi
SgSpaceshipOp* buildSpaceshipOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildStatementExpression
SgStatementExpression* buildStatementExpression(SgStatement* exp, SgType* result_type, SgScopeStatement* semantic_scope);

Build a GNU statement expression

buildStatementExpression_nfi
SgStatementExpression* buildStatementExpression_nfi(SgStatement* exp, SgType* result_type, SgScopeStatement* semantic_scope);

buildStaticAssertionDeclaration
SgStaticAssertionDeclaration* buildStaticAssertionDeclaration(SgExpression* condition, SgExpression* message = nullptr);

DQ (7/25/2014): Adding support for C11 static assertions.

buildStaticAssertionDeclaration_nfi
SgStaticAssertionDeclaration* buildStaticAssertionDeclaration_nfi(SgExpression* condition, SgExpression* message = nullptr);

buildStmtDeclarationStatement
SgStmtDeclarationStatement* buildStmtDeclarationStatement(SgStatement* stmt);

Build a StmtDeclarationStmt

buildStmtDeclarationStatement_nfi
SgStmtDeclarationStatement* buildStmtDeclarationStatement_nfi(SgStatement* stmt);

buildStringType
SgTypeString* buildStringType();

DQ (8/21/2010): We want to move to the new buildStringType( SgExpression*,size_t) function over the older buildStringType() function.

buildStringVal
SgStringVal* buildStringVal(std::string value = "");

buildStringVal_nfi
SgStringVal* buildStringVal_nfi(std::string value);

buildStructDeclaration
SgClassDeclaration* buildStructDeclaration(declaration_ownership const& ownership, SgName const& name, SgScopeStatement* scope);

Build a structure, It is also a declaration statement in SAGE III

buildSubscriptExpression_nfi
SgSubscriptExpression* buildSubscriptExpression_nfi(SgExpression* lower_bound, SgExpression* upper_bound, SgExpression* stride);

Build a SgSubscriptExpression, used for array shape expressions. The lower bound and stride may be nullptrs

buildSubtractOp
SgSubtractOp* buildSubtractOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildSubtractOp_nfi
SgSubtractOp* buildSubtractOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildSuperExp
SgSuperExp* buildSuperExp(SgClassSymbol* sym);

Build super pointer

buildSuperExp_nfi
SgSuperExp* buildSuperExp_nfi(SgClassSymbol* sym);

buildSwitchStatement
SgSwitchStatement* buildSwitchStatement(SgExpression* item_selector, SgStatement* body = NULL);

Build a switch statement

buildSwitchStatement_nfi
SgSwitchStatement* buildSwitchStatement_nfi(SgStatement* item_selector, SgStatement* body);

buildTargetBuiltinType
SgTypeTargetBuiltin* buildTargetBuiltinType(SgName const& spelling, SgTypeTargetBuiltin::target_family_enum target_family);

buildTemplateClassDeclaration
SgTemplateClassDeclaration* buildTemplateClassDeclaration(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, template_class_declaration_scopes const& scopes, SgTemplateClassDeclaration* nonDefiningDecl, SgTemplateParameterPtrList* nondefiningTemplateParameterList, SgTemplateParameterPtrList* definingTemplateParameterList, SgTemplateArgumentPtrList* templateSpecializationArgumentList, SgName const* templateSpecializationNameOverride);

Build tempplate class declaration

buildTemplateClassDeclaration_nfi
SgTemplateClassDeclaration* buildTemplateClassDeclaration_nfi(declaration_ownership const& ownership, SgName const& name, SgClassDeclaration::class_types kind, template_class_declaration_scopes const& scopes, SgTemplateClassDeclaration* nonDefiningDecl, SgTemplateParameterPtrList* nondefiningTemplateParameterList, SgTemplateParameterPtrList* definingTemplateParameterList, SgTemplateArgumentPtrList* templateSpecializationArgumentList, SgName const* templateSpecializationNameOverride);

buildTemplateClassDefinition
SgTemplateClassDefinition* buildTemplateClassDefinition(SgTemplateClassDeclaration* d = NULL);

Build a template class definition statement

buildTemplateClassType
SgClassType* buildTemplateClassType(SgTemplateClassDeclaration* template_decl, std::vector<SgNode*>& template_args);

Same as buildClassTemplateType(), just better name

buildTemplateFunctionRefExp_nfi
SgTemplateFunctionRefExp* buildTemplateFunctionRefExp_nfi(SgTemplateFunctionSymbol* sym);

DQ (12/15/2011): Adding template declaration support to the AST.

buildTemplateInstantiationTypedefDeclaration_nfi
SgTemplateInstantiationTypedefDeclaration* buildTemplateInstantiationTypedefDeclaration_nfi(typedef_declaration_ownership const& ownership, SgTypedefDeclaration::typedef_type_enum declarationForm, SgName& name, SgType* base_type, SgScopeStatement* scope, SgTemplateTypedefDeclaration* templateTypedefDeclaration, SgTemplateArgumentPtrList& templateArgumentsList, SgName const& semanticInstantiationName);

buildTemplateMemberFunctionRefExp_nfi
SgTemplateMemberFunctionRefExp* buildTemplateMemberFunctionRefExp_nfi(SgTemplateMemberFunctionSymbol* sym, bool virtual_call, bool need_qualifier);

DQ (12/29/2011): Adding template declaration support to the AST.

buildTemplateParameter
SgTemplateParameter* buildTemplateParameter(SgTemplateParameter::template_parameter_enum parameterType, SgType*, SgTemplateParameter::template_parameter_keyword_enum keyword);

Build a template parameter, passing enum kind and SgTemplateType template_parameter_enum { parameter_undefined = 0, type_parameter = 1, nontype_parameter = 2, template_parameter = 3}

buildTemplateParameterVal
SgTemplateParameterVal* buildTemplateParameterVal(int template_parameter_position = ‐1);

Build an template parameter value expression

buildTemplateParameterVal_nfi
SgTemplateParameterVal* buildTemplateParameterVal_nfi(int template_parameter_position, std::string const& str);

buildTemplateType
SgTemplateType* buildTemplateType(SgName name = "");

Build a template type, used for template parameter and later argument

buildTemplateTypedefDeclaration_nfi
SgTemplateTypedefDeclaration* buildTemplateTypedefDeclaration_nfi(typedef_declaration_ownership const& ownership, SgTypedefDeclaration::typedef_type_enum declarationForm, SgName const& name, SgType* base_type, SgScopeStatement* scope);

buildTemplateVariableDeclaration
SgTemplateVariableDeclaration* buildTemplateVariableDeclaration(declaration_ownership const& ownership, SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, template_variable_entity_kind entityKind = template_variable_entity_kind::primary_template, SgInitializedName* priorDeclaration = nullptr);

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.

buildTemplateVariableDeclaration_nfi
SgTemplateVariableDeclaration* buildTemplateVariableDeclaration_nfi(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, template_variable_entity_kind entityKind = template_variable_entity_kind::primary_template, SgInitializedName* priorDeclaration = nullptr);

buildThisExp
SgThisExp* buildThisExp(SgSymbol* sym, SgType* expression_type);

Build this pointer

buildThisExp_nfi
SgThisExp* buildThisExp_nfi(SgSymbol* sym, SgType* expression_type);

buildThrowOp
SgThrowOp* buildThrowOp(SgExpression*, SgType* result_type, SgThrowOp::e_throw_kind);

Build a ThrowOp expression

buildThrowOp_nfi
SgThrowOp* buildThrowOp_nfi(SgExpression*, SgType* result_type, SgThrowOp::e_throw_kind);

buildTransformationCastExp
SgCastExp* buildTransformationCastExp(SgExpression* operand_i, SgType* expression_type, SgCastExp::cast_type_enum cast_type);

Build a source‐emitting transformation cast whose semantics are completely determined by its exact operand and result types. Ambiguous conversions are rejected instead of being assigned a guessed conversion kind.

buildTransformationCastExp_nfi
SgCastExp* buildTransformationCastExp_nfi(SgExpression* operand_i, SgType* expression_type, SgCastExp::cast_type_enum cast_type);

buildTryStmt
SgTryStmt* buildTryStmt(SgStatement* body, SgCatchOptionStmt* catch0 = NULL, SgCatchOptionStmt* catch1 = NULL, SgCatchOptionStmt* catch2 = NULL, SgCatchOptionStmt* catch3 = NULL, SgCatchOptionStmt* catch4 = NULL);

Build a try statement.

buildTypeExpression
SgTypeExpression* buildTypeExpression(SgType* type);

DQ (7/24/2014): Adding support for c11 generic operands.

buildTypeExpression_nfi
SgTypeExpression* buildTypeExpression_nfi(SgType* type);

buildTypeIdOp
SgTypeIdOp* buildTypeIdOp(SgExpression* operand_expr, SgType* operand_type, SgType* expression_type = NULL);

DQ (1/25/2013): Added support for typeId operators.

buildTypeIdOp_nfi
SgTypeIdOp* buildTypeIdOp_nfi(SgExpression* operand_expr, SgType* operand_type, SgType* expression_type);

buildTypeOfType
SgTypeOfType* buildTypeOfType(SgExpression* base_expression, SgType* base_type);

Build a GNU typeof operator

buildTypeRequirement_nfi
SgTypeRequirement* buildTypeRequirement_nfi(SgType* required_type);

buildTypeTraitBuiltinOperator
SgTypeTraitBuiltinOperator* buildTypeTraitBuiltinOperator(SgName functionName, SgTypeTraitBuiltinOperator::builtin_operator_kind_enum builtinKind, SgType* result_type, SgExpressionPtrList parameters);

buildTypeTraitBuiltinOperator_nfi
SgTypeTraitBuiltinOperator* buildTypeTraitBuiltinOperator_nfi(SgName functionName, SgTypeTraitBuiltinOperator::builtin_operator_kind_enum builtinKind, SgType* result_type, SgExpressionPtrList parameters);

buildTypedefDeclaration
SgTypedefDeclaration* buildTypedefDeclaration(typedef_declaration_ownership const& ownership, SgTypedefDeclaration::typedef_type_enum declarationForm, std::string const& name, SgType* base_type, SgScopeStatement* scope);

buildTypedefDeclarationWithEmbeddedTag
SgTypedefDeclaration* buildTypedefDeclarationWithEmbeddedTag(typedef_declaration_ownership const& ownership, SgTypedefDeclaration::typedef_type_enum declarationForm, std::string const& name, SgType* base_type, SgScopeStatement* scope, SgDeclarationStatement* embeddedDefinition);

buildTypedefDeclarationWithEmbeddedTag_nfi
SgTypedefDeclaration* buildTypedefDeclarationWithEmbeddedTag_nfi(typedef_declaration_ownership const& ownership, SgTypedefDeclaration::typedef_type_enum declarationForm, std::string const& name, SgType* base_type, SgScopeStatement* scope, SgDeclarationStatement* embeddedDefinition);

buildTypedefDeclaration_nfi
SgTypedefDeclaration* buildTypedefDeclaration_nfi(typedef_declaration_ownership const& ownership, SgTypedefDeclaration::typedef_type_enum declarationForm, std::string const& name, SgType* base_type, SgScopeStatement* scope);

buildUnaryAddOp
SgUnaryAddOp* buildUnaryAddOp(SgExpression* op, SgType* result_type);

buildUnaryAddOp_nfi
SgUnaryAddOp* buildUnaryAddOp_nfi(SgExpression* op, SgType* result_type);

buildUnaryExpression
template<class T> T* buildUnaryExpression(SgExpression* operand, SgType* result_type);

Template function to build a unary expression of type T. Instantiated functions include:buildAddressOfOp(),buildBitComplementOp(),buildBitComplementOp(),buildMinusOp(),buildNotOp(),buildPointerDerefExp(),buildUnaryAddOp(),buildMinusMinusOp(),buildPlusPlusOp(). They are also used for the unary vararg operators (which are not technically unary operators). The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros.

buildUnaryExpression_nfi
template<class T> T* buildUnaryExpression_nfi(SgExpression* operand, SgType* result_type);

Template function to build a unary expression of type T with no file info. Instantiated functions include:buildAddressOfOp(),buildBitComplementOp(),buildBitComplementOp(),buildMinusOp(),buildNotOp(),buildPointerDerefExp(),buildUnaryAddOp(),buildMinusMinusOp(),buildPlusPlusOp(). They are also used for the unary vararg operators (which are not technically unary operators). The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros.

buildUnknownType
SgTypeUnknown* buildUnknownType();

buildUnpublishedVariableDeclaration
SgVariableDeclaration* buildUnpublishedVariableDeclaration(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope);

Build one source‐positioned variable declaration without publishing a symbol. This is an internal transaction primitive: the caller must establish exact lexical ownership and publish the symbol before returning the declaration to application code.

buildUnpublishedVariableDeclarationWithEmbeddedTag_nfi
SgVariableDeclaration* buildUnpublishedVariableDeclarationWithEmbeddedTag_nfi(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, SgDeclarationStatement* embeddedDefinition, SgStorageModifier::storage_modifier_enum sm = SgStorageModifier::e_default);

Build an embedded‐tag variable subtree without publishing its symbol. The frontend must attach exact redeclaration identity and publish the symbol in the same construction transaction.

buildUnsigned128bitIntegerType
SgTypeUnsigned128bitInteger* buildUnsigned128bitIntegerType();

buildUnsignedCharType
SgTypeUnsignedChar* buildUnsignedCharType();

buildUnsignedCharVal
SgUnsignedCharVal* buildUnsignedCharVal(unsigned char v = 0);

Build an unsigned char

buildUnsignedCharValHex
SgUnsignedCharVal* buildUnsignedCharValHex(unsigned char v = 0);

buildUnsignedCharVal_nfi
SgUnsignedCharVal* buildUnsignedCharVal_nfi(unsigned char v, std::string const& str);

buildUnsignedIntType
SgTypeUnsignedInt* buildUnsignedIntType();

buildUnsignedIntVal
SgUnsignedIntVal* buildUnsignedIntVal(unsigned int v = 0);

Build an unsigned integer

buildUnsignedIntValHex
SgUnsignedIntVal* buildUnsignedIntValHex(unsigned int v = 0);

buildUnsignedIntVal_nfi
SgUnsignedIntVal* buildUnsignedIntVal_nfi(unsigned int v, std::string const& str);

buildUnsignedLongLongIntVal
SgUnsignedLongLongIntVal* buildUnsignedLongLongIntVal(unsigned long long v = 0);

Build an unsigned long long integer

buildUnsignedLongLongIntValHex
SgUnsignedLongLongIntVal* buildUnsignedLongLongIntValHex(unsigned long long v = 0);

buildUnsignedLongLongIntVal_nfi
SgUnsignedLongLongIntVal* buildUnsignedLongLongIntVal_nfi(unsigned long long v, std::string const& str);

buildUnsignedLongLongType
SgTypeUnsignedLongLong* buildUnsignedLongLongType();

buildUnsignedLongType
SgTypeUnsignedLong* buildUnsignedLongType();

buildUnsignedLongVal
SgUnsignedLongVal* buildUnsignedLongVal(unsigned long v = 0);

Build a unsigned long integer

buildUnsignedLongValHex
SgUnsignedLongVal* buildUnsignedLongValHex(unsigned long v = 0);

buildUnsignedLongVal_nfi
SgUnsignedLongVal* buildUnsignedLongVal_nfi(unsigned long v, std::string const& str);

buildUnsignedShortType
SgTypeUnsignedShort* buildUnsignedShortType();

buildUnsignedShortVal
SgUnsignedShortVal* buildUnsignedShortVal(unsigned short v = 0);

Build an unsigned short integer

buildUnsignedShortValHex
SgUnsignedShortVal* buildUnsignedShortValHex(unsigned short v = 0);

buildUnsignedShortVal_nfi
SgUnsignedShortVal* buildUnsignedShortVal_nfi(unsigned short v, std::string const& str);

buildUsingDirectiveStatement
SgUsingDirectiveStatement* buildUsingDirectiveStatement(SgNamespaceDeclarationStatement* ns_decl);

Build a using directive statement

buildUsingDirectiveStatement_nfi
SgUsingDirectiveStatement* buildUsingDirectiveStatement_nfi(SgNamespaceDeclarationStatement* ns_decl);

buildVarArgCopyOp
SgVarArgCopyOp* buildVarArgCopyOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildVarArgCopyOp_nfi
SgVarArgCopyOp* buildVarArgCopyOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildVarArgEndOp
SgVarArgEndOp* buildVarArgEndOp(SgExpression* op, SgType* result_type);

buildVarArgEndOp_nfi
SgVarArgEndOp* buildVarArgEndOp_nfi(SgExpression* op, SgType* result_type);

buildVarArgOp_nfi
SgVarArgOp* buildVarArgOp_nfi(SgExpression* operand_i, SgType* expression_type);

Build vararg op expression

buildVarArgStartOneOperandOp
SgVarArgStartOneOperandOp* buildVarArgStartOneOperandOp(SgExpression* op, SgType* result_type);

buildVarArgStartOneOperandOp_nfi
SgVarArgStartOneOperandOp* buildVarArgStartOneOperandOp_nfi(SgExpression* op, SgType* result_type);

buildVarArgStartOp
SgVarArgStartOp* buildVarArgStartOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildVarArgStartOp_nfi
SgVarArgStartOp* buildVarArgStartOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildVarRefExp
SgVarRefExp* buildVarRefExp(SgVariableDeclaration* vardecl);

buildVarRefExp overloads

buildVarRefExp_nfi
SgVarRefExp* buildVarRefExp_nfi(SgVariableSymbol* varSymbol);

buildVariableDeclaration
SgVariableDeclaration* buildVariableDeclaration(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope);

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.

buildVariableDeclarationWithEmbeddedTag
SgVariableDeclaration* buildVariableDeclarationWithEmbeddedTag(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, SgInitializedName* priorDeclaration, SgDeclarationStatement* embeddedDefinition);

Build a fresh variable declaration which is the exact physical owner of a source‐spelled class/enum definition embedded in its declarator.

buildVariableDeclarationWithEmbeddedTag_nfi
SgVariableDeclaration* buildVariableDeclarationWithEmbeddedTag_nfi(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, SgInitializedName* priorDeclaration, SgDeclarationStatement* embeddedDefinition, SgStorageModifier::storage_modifier_enum sm = SgStorageModifier::e_default);

Build an embedded‐tag variable declaration with null frontend positions.

buildVariableDeclaration_nfi
SgVariableDeclaration* buildVariableDeclaration_nfi(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, SgStorageModifier::storage_modifier_enum sm = SgStorageModifier::e_default);

Build a fresh variable declaration with null frontend source positions.

buildVariableDefinition_nfi
SgVariableDefinition* buildVariableDefinition_nfi(SgVariableDeclaration* decl, SgInitializedName* init_name, SgInitializer* init);

Build variable definition

buildVariableRedeclaration
SgVariableDeclaration* buildVariableRedeclaration(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, SgInitializedName* priorDeclaration);

Build a fresh, detached redeclaration with an explicit prior identity.

buildVariableRedeclaration_nfi
SgVariableDeclaration* buildVariableRedeclaration_nfi(SgName const& name, SgType* type, SgInitializer* varInit, SgScopeStatement* scope, SgInitializedName* priorDeclaration, SgStorageModifier::storage_modifier_enum sm = SgStorageModifier::e_default);

Build a fresh, detached redeclaration with null frontend source positions.

buildVariantExpression
SgVariantExpression* buildVariantExpression();

handle side effects of parent pointers, Sg_File_Info, lvalue etc.

buildVoidType
SgTypeVoid* buildVoidType();

buildVoidVal
SgVoidVal* buildVoidVal();

DQ (2/14/2019): Adding support for C++14 void value expressions.

buildVoidVal_nfi
SgVoidVal* buildVoidVal_nfi();

buildVolatileType
SgModifierType* buildVolatileType(SgType* base_type = nullptr);

Build a volatile type.

buildWcharType
SgTypeWchar* buildWcharType();

buildWcharVal
SgWcharVal* buildWcharVal(wchar_t value = 0);

buildWcharVal_nfi
SgWcharVal* buildWcharVal_nfi(wchar_t value, std::string const& str);

buildWhileStmt
SgWhileStmt* buildWhileStmt(SgExpression* condition, SgStatement* body);

Build while statement

buildWhileStmt_nfi
SgWhileStmt* buildWhileStmt_nfi(SgStatement* condition, SgStatement* body);

buildXorAssignOp
SgXorAssignOp* buildXorAssignOp(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

buildXorAssignOp_nfi
SgXorAssignOp* buildXorAssignOp_nfi(SgExpression* lhs, SgExpression* rhs, SgType* result_type);

clearScopeStack
void clearScopeStack();

completeSemanticFunctionDeclarationAsDefinition
SgFunctionDeclaration* completeSemanticFunctionDeclarationAsDefinition(SgFunctionDeclaration* declaration);

Complete one source‐less semantic function declaration as its own definition when no distinct declaration precedes it.

detachAuxiliaryDeclaration
bool detachAuxiliaryDeclaration(SgScopeStatement* owner, SgDeclarationStatement* declaration);

Remove a semantic‐only declaration ownership edge.

detachDeclarationScope
void detachDeclarationScope(SgScopeStatement* owner, SgDeclarationScope* scope);

display
std::string display(SourcePositionClassification& scp);

display function for debugging

emptyScopeStack
bool emptyScopeStack();

errorCheckingTargetAST
void errorCheckingTargetAST(SgNode* node_copy, SgNode* node_original, SgFile* targetFile);

Error checking the inserted snippet AST.

findAssociatedDeclarationInTargetAST
SgDeclarationStatement* findAssociatedDeclarationInTargetAST(SgDeclarationStatement* snippet_declaration, SgScopeStatement* targetScope);

findAssociatedSymbolInTargetAST
SgSymbol* findAssociatedSymbolInTargetAST(SgDeclarationStatement* snippet_declaration, SgScopeStatement* targetScope);

finishSourceDeclaratorScopeConstruction
void finishSourceDeclaratorScopeConstruction(SgDeclarationStatement* owner, SgDeclarationScope* scope);

Complete a source‐declarator scope begun by beginSourceDeclaratorScopeConstruction(). Every child must have one exact nonautonomous structural role and already‐published physical provenance.

fixupCopyOfAstFromSeparateFileInNewTargetAst
void fixupCopyOfAstFromSeparateFileInNewTargetAst(SgStatement* insertionPoint, bool insertionPointIsScope, SgStatement* toInsert, SgStatement* original_before_copy);

Fixup any AST moved from one file two another (references to symbols, types, etc.).

fixupCopyOfNodeFromSeparateFileInNewTargetAst
void fixupCopyOfNodeFromSeparateFileInNewTargetAst(SgStatement* insertionPoint, bool insertionPointIsScope, SgNode* node_copy, SgNode* node_original);

fixupSharingSourcePosition
void fixupSharingSourcePosition(SgNode* subtreeRoot, int new_file_id);

Sharing IR nodes requires that the file id be added to the fileIDsToUnparse held in the Sg_File_Info object.

getDeclarationScopeOwner
SgNode* getDeclarationScopeOwner(SgDeclarationScope const* scope);

getGlobalScopeFromScopeStack
SgScopeStatement* getGlobalScopeFromScopeStack();

Support to retrive the SgGlobal from the internal scope stack (error if not present in a non‐empty list, return null for empty list).

getNonrealDeclarationScope
SgDeclarationScope* getNonrealDeclarationScope(SgDeclarationStatement* owner);

Get the nonreal declaration scope associated with a declaration (if any).

getOrCreateNonrealDeclarationScope
SgDeclarationScope* getOrCreateNonrealDeclarationScope(SgDeclarationStatement* owner);

Get or create the nonreal declaration scope associated with a declaration.

getSourcePositionClassificationMode
SourcePositionClassification getSourcePositionClassificationMode();

Get the current source position classification (defines how IR nodes built by the SageBuilder interface will be classified).

getTargetFileType
SgType* getTargetFileType(SgType* snippet_type, SgScopeStatement* targetScope);

getTargetFileTypeSupport
SgType* getTargetFileTypeSupport(SgType* snippet_type, SgScopeStatement* targetScope);

getTemplateArgumentList
SgTemplateArgumentPtrList* getTemplateArgumentList(SgDeclarationStatement* decl);

getTemplateParameterList
SgTemplateParameterPtrList* getTemplateParameterList(SgDeclarationStatement* decl);

inSwitchScope
bool inSwitchScope();

initializePendingSourceVariableDeclarationProvenance
void initializePendingSourceVariableDeclarationProvenance(SgVariableDeclaration* declaration);

Complete the provenance of a detached frontend source declaration before its exact declaration range is known. Fresh structural wrappers receive semantic generated provenance while already source‐positioned expression operands retain their exact immutable provenance.

initializeSemanticExpressionSourceProvenance
void initializeSemanticExpressionSourceProvenance(SgExpression* expression);

Classify one fresh semantic‐only expression with complete compiler‐generated provenance. Source‐positioned or partially positioned input is malformed.

initializeSemanticVariableDeclarationSourceProvenance
void initializeSemanticVariableDeclarationSourceProvenance(SgVariableDeclaration* declaration);

Classify a freshly built semantic‐only variable declaration and every structurally owned located child with exact compiler‐generated provenance. Source‐positioned or partially positioned input is malformed and aborts.

popScopeStack
void popScopeStack();

publishExactSourceLexicalDeclaration
void publishExactSourceLexicalDeclaration(SgDeclarationStatement* declaration, SgScopeStatement* scope);

Complete one source‐lexical declaration transaction whose builder used sourceLexicalPendingExactSource(). The declaration must still be detached and must already own exact physical source provenance. This operation publishes the lexical owner exactly once and never synthesizes or repairs source information.

pushScopeStack
void pushScopeStack(SgScopeStatement* stmt);

Public interfaces of the scope stack, should be stable

rebindCopiedSourceFilePhysicalIdentity
void rebindCopiedSourceFilePhysicalIdentity(SgSourceFile* sourceFile, std::string const& newFileName);

Commit the physical identity of a parsed source‐file copy. The source file must still identify the primary file it was parsed from. Positions owned by that primary file are rebound to newFileName. Positions originating in included files retain their exact physical provenance. Incomplete, shared, or mixed source ranges are hard producer errors.

requireFreshNfiExpressionSourceState
void requireFreshNfiExpressionSourceState(SgExpression* expression, char const* producer);

requireFreshNfiLocatedNodeSourceState
void requireFreshNfiLocatedNodeSourceState(SgLocatedNode* node, char const* producer);

Enforce the construction‐time contract shared by all expression builders whose names end in _nfi: the newly allocated root must not already own any source‐position object. This validator never clears or repairs provenance.

setNonrealDeclarationScope
void setNonrealDeclarationScope(SgDeclarationStatement* owner, SgDeclarationScope* scope);

Attach a nonreal declaration scope to a declaration.

setSourcePositionClassificationMode
void setSourcePositionClassificationMode(SourcePositionClassification X);

Set the current source position classification (defines how IR nodes built by the SageBuilder interface will be classified).

setTemplateArgumentParents
void setTemplateArgumentParents(SgDeclarationStatement* decl);

setTemplateArgumentsInDeclaration
void setTemplateArgumentsInDeclaration(SgDeclarationStatement* decl, SgTemplateArgumentPtrList* templateArgumentsList_input);

DQ (9/16/2012): Added function to support setting the template arguments and setting their parents (and for any relevant declaration).

setTemplateNameInTemplateInstantiations
void setTemplateNameInTemplateInstantiations(SgFunctionDeclaration* func, SgName const& name);

DQ (2/11/2012): Added support to set the template name in function template instantiations (member and non‐member).

setTemplateParameterParents
void setTemplateParameterParents(SgDeclarationStatement* decl);

setTemplateParametersInDeclaration
void setTemplateParametersInDeclaration(SgDeclarationStatement* decl, SgTemplateParameterPtrList* templateParametersList_input);

setTemplateSpecializationArgumentsInDeclaration
void setTemplateSpecializationArgumentsInDeclaration(SgDeclarationStatement* decl, SgTemplateArgumentPtrList* templateSpecializationArgumentsList_input);

testTemplateArgumentParents
void testTemplateArgumentParents(SgDeclarationStatement* decl);

testTemplateParameterParents
void testTemplateParameterParents(SgDeclarationStatement* decl);

DQ (9/16/2012): Added function to support setting the template parameters and setting their parents (and for any relevant declaration).

topScopeStack
SgScopeStatement* topScopeStack();

Variables

Name

Description

ScopeStack

intended to be a private member, don't access it directly. could be changed any time

SourcePositionClassificationMode

C++ SageBuilder namespace specific state for storage of the source code position state (used to control how the source code positon is defined for IR nodes built within the SageBuilder interface).

symbol_table_case_insensitive_semantics

Support for construction of case sensitive/insensitive symbol table handling in scopes.

Using Namespace Directives

Name

Templates

Description

Building AST trees using raw SgNode constructors is tedious and error‐prone. It becomes even more difficult with the presence of symbol tables. This namespace contains major AST node builders on top of the constructors to take care of symbol tables, various edges to scope, parent relationships, and so on.

Created with MrDocs