SageInterface::addStepToLoopBody
Add a step statement to the end of a loop body Add a new label to the end of the loop, with the step statement after it; then change all continue statements in the old loop body into jumps to the label
Synopsis
Declared in <SageIII/sageInterface/sageInterface.h>
[[visibility]]
void
addStepToLoopBody(
SgScopeStatement* loopStmt,
SgStatement* step);
Description
For example: while (a < 5) {if (a < ‐3) continue;} (adding "a++" to end) becomes while (a < 5) {if (a < ‐3) goto label; label: a++;}
Parameters
Name |
Description |
loopStmt |
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.). |
step |
This class represents the notion of a statement. |
Created with MrDocs