Skip to content

SgStatement::replace_statement

All overloads of SgStatement::replace_statement

This function replaces the target statement with a single statement.

Synopsis

Declared in <src/frontend/SageIII/Cxx_Grammar.h> (not stored in Git)

void
replace_statement(
    SgStatement* target,
    SgStatement* newstmt);

Description

This function handles the replacement of the specified target statement with a new statement.

Return Value

Function returns void.

Parameters

Name Description
target - location of the statement to be replaced.
newstmt - New statement to replace target statement in the AST.

Created with MrDocs