SageInterface::forLoopNormalization
Normalize a for loop. Malformed or non‐canonicalizable loop headers are hard errors detected by a read‐only preflight before the AST is mutated.
Synopsis
Declared in <SageIII/sageInterface/sageInterface.h>
[[visibility]]
void
forLoopNormalization(
SgForStatement* loop,
bool foldConstant = true);
Description
Translations are : For the init statement: for (int i=0;... ) becomes a declaration in the immediately enclosing lexical scope followed by for (i=0;..) The test's typed inclusive or exclusive comparison is preserved. For increment expression: i++ is normalized to i+=1 and i‐‐ is normalized to i‐=1. Canonical assignment increments are normalized to += or ‐= while preserving a positive stride magnitude.
Parameters
Name |
Description |
loop |
This class represents the concept of a for loop. |
Created with MrDocs