Skip to content

SageInterface::mergeDeclarationWithAssignment

Merge a declaration statement into a matching followed variable assignment. Callers should make sure the merge is semantically correct (by not introducing compilation errors). This function simply does the merge transformation, without eligibility check.

Synopsis

Declared in <SageIII/sageInterface/sageInterface.h>

[[visibility]]
bool
mergeDeclarationWithAssignment(
    SgVariableDeclaration* decl,
    SgExprStatement* assign_stmt);

Description

e.g. int i; i=10; becomes int i=10; the original int i; will be deleted after the merge

Parameters

Name

Description

decl

This class represents the concept of a C or C++ variable declaration.

assign_stmt

This class represents the concept of a C or C++ statement which contains a

Created with MrDocs