pushTestIntoBody¶
Rewrites a loop so that the official test is changed to "true" and what had previously been the test is now an if-break combination at the beginning of a while/for body or the end of a do-while body.
Synopsis¶
Declared in <src/midend/programTransformation/astInlining/replaceExpressionWithStatement.h>
void
pushTestIntoBody(SgScopeStatement* loopStmt); Description¶
For example, "while (a < 5) ++a;" becomes: "while (true) {bool temp = (a < 5); if (!temp) break; ++a;}"
Parameters¶
| Name | Description |
|---|---|
| loopStmt | This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.). |
Created with MrDocs