SgNodeHelper::loopRelevantBreakStmtNodes
returns a set of SgNode where each node is a break node, but properly excludes all nested loops.
Synopsis
Description
The only property this function maintains during traversal of the AST is that it does not collect break nodes from nested loops but only from the current scope. Only those breaks are loopârelevant, meaning only those can force an exit of the loop. Break statements inside if statements or Conditional Expressions inside the loop are handled properly. Excluded are only constructs where a break statement refers to that nested loop but not the current (=relevant) loop. This function can be used for: SgWhile,SgDoWhile,SgForStatement, SgSwitch.
Parameters
Name |
Description |
node [in] |
can point directly to the AST construct (e.g. SgIfStatement) or a basic block of the respective loop construct. |
Created with MrDocs