ROSE  0.9.10.89
Public Member Functions | List of all members
ExtractFunctionArguments Class Reference

Description

This normalization makes sure each function call argument is a side-effect free expression of only one variable.

To accomplish this, temporary variables are declared and the arguments of a function are evaluated before the function itself. Note: Normalization is not performed if it is unsafe. E,g.: while(Foo(Bar()) {} is not equal to t = Bar(); while(Foo(t) {} Note that only SgFunctionCall arguments are normalized. For example the arguments of the constructor initializer MyObject o(foo(), bar()) will not be extracted.

Definition at line 16 of file ExtractFunctionArguments.h.

#include <ExtractFunctionArguments.h>

Public Member Functions

void NormalizeTree (SgNode *tree, bool doUnsafeNormalization=false)
 Performs the function argument extraction on all function calls in the given subtree of the AST. More...
 
std::vector< SgVariableDeclaration * > GetTemporariesIntroduced ()
 
bool IsNormalized (SgNode *tree)
 
bool IsNormalizable (SgNode *tree)
 

Member Function Documentation

void ExtractFunctionArguments::NormalizeTree ( SgNode tree,
bool  doUnsafeNormalization = false 
)

Performs the function argument extraction on all function calls in the given subtree of the AST.

It does not do transofrmations in places where it is not safe. If you pass doUnsafeNormalization= true, we will normalize all call sites ignoring the safety (Suggested by Markus Schordan)


The documentation for this class was generated from the following file: