Rose2OA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
UseOA Namespace Reference

Classes

struct  eqTypes
 
class  IndexExpressionTraversal
 

Functions

static std::string stripParameterType (const std::string &name)
 Strip the "const" keyword from a string. More...
 
void getTypeInfo (SgType *t, std::string *tname, std::string *stripname, int *size)
 Return a type's name and size. More...
 
bool isNonStaticMethodCall (SgFunctionCallExp *functionCall, bool &isDotExp)
 isNonStaticMethodCall returns true if the invoked procedure is a method (i.e., a constructor, a destructor, or a non-static method). More...
 
SgPointerDerefExp * isFunctionPointer (SgFunctionCallExp *functionCall)
 
SgFunctionDeclaration * getFunctionDeclaration (SgFunctionCallExp *functionCall)
 Return the SgFunctionDeclaration invoked by a function call. More...
 
void verifyCallHandleNodeType (SgNode *node)
 
void verifyStmtHandleNodeType (SgNode *node)
 
void verifySymHandleNodeType (SgNode *node)
 
void getFormalTypes (SgNode *node, std::vector< SgType * > &formalTypes)
 Return a list of the types of the formal parameters involved in a function, method, or constructor invocation. More...
 
bool isDestructor (SgMemberFunctionDeclaration *memberFunctionDeclaration)
 Returns true if the method is a destructor. More...
 
SgMemberFunctionDeclaration * lookupDestructorInClass (SgClassDefinition *classDefinition)
 Returns a destructor method declaration within a class if it exists. More...
 
SgNode * getConstructorInitializerLhs (SgConstructorInitializer *ctorInitializer)
 Return the lhs of a constructor initializer. More...
 
void getActuals (SgNode *node, std::list< SgNode * > &actuals)
 Return the actual arguments from a method, which may include a constructor or destructor, or function invocation. More...
 
SgFunctionDefinition * getEnclosingFunction (SgNode *node)
 Return the function in which node occurs. More...
 
static bool isVirtualWithinDefiningClass (SgFunctionDeclaration *functionDeclaration)
 Return boolean indicating whether a function is declared virtual in its defining class. More...
 
bool isDeclaredVirtualWithinClassAncestry (SgFunctionDeclaration *functionDeclaration, SgClassDefinition *classDefinition)
 Return boolean indicating whether a function is declared virtual in some parent class of SgClassDefinition. More...
 
static bool isDeclaredVirtualWithinAncestor (SgFunctionDeclaration *functionDeclaration)
 Return boolean indicating whether a function is declared virtual in some parent class, regardless of whether it is declared virtual in its defining class. More...
 
bool isConstructor (SgMemberFunctionDeclaration *memberFunctionDeclaration)
 Returns true if the method is a constructor. More...
 
bool isVirtual (SgFunctionDeclaration *functionDeclaration)
 Return boolean indicating whether a function is virtual– i.e., whether it is declared virtual in its defining class or any of that class' base classes. More...
 
bool isPureVirtual (SgFunctionDeclaration *functionDeclaration)
 Returns true if method is a pure virtual method. More...
 
bool hasDefinition (SgFunctionDeclaration *functionDeclaration)
 
bool classHasVirtualMethods (SgClassDefinition *classDefinition)
 Return true if a class or any of its base classes has a virtual method. More...
 
bool consistentFunctionTypes (SgFunctionType *funcType1, SgFunctionType *funcType2)
 Return boolean indicating whether two functions have the same type signature. More...
 
bool matchingFunctions (SgFunctionDeclaration *decl1, SgFunctionDeclaration *decl2)
 
std::string mangleFunctionName (SgFunctionDeclaration *functionDeclaration)
 Return a function's mangled name. More...
 
SgClassDeclaration * getClassDeclaration (SgType *type)
 Return the declaration of the class with a given type. More...
 
SgClassDefinition * getClassDefinition (SgType *type)
 Return the definition of the class with a given type. More...
 
SgFunctionDeclaration * getDefiningDeclaration (SgFunctionDeclaration *funcDecl)
 
SgClassDeclaration * getDefiningDeclaration (SgClassDeclaration *classDecl)
 
bool isFunc (SgFunctionCallExp *functionCallExp,::std::string funcName)
 Returns boolean indicating whether the invoked function has name funcName. More...
 
bool returnsReference (SgFunctionCallExp *functionCallExp)
 
bool returnsAddress (SgFunctionCallExp *functionCallExp)
 
SgNode * getThisExpNode (SgNode *node)
 Return a SgNode representing a 'this' expression. More...
 
bool isObjectInitialization (SgConstructorInitializer *ctorInitializer)
 Return boolean indicating whether the SgConstructorInitializer initializes an object. More...
 
bool isBaseClassInvocation (SgConstructorInitializer *ctorInitializer)
 
SgMemberFunctionDeclaration * getInvokedMethod (SgMemberFunctionRefExp *memberFunctionRefExp)
 
bool isNonStaticMethod (SgMemberFunctionDeclaration *memberFunctionDecl)
 isNonStaticMethod returns boolen indicating whether the method is a non-static method. More...
 
bool isVaStart (SgFunctionCallExp *functionCallExp)
 Return boolean indicating whether the invoked function is va_start. More...
 
SgType * getBaseType (SgType *type)
 
SgType * lookThruReferenceType (SgType *type)
 
bool isArrowExp (SgExpression *function)
 
bool findNodeInSubtree (SgNode *needle, SgNode *haystack)
 
bool isPlacementNew (SgNewExp *newExp)
 
SgFunctionDeclaration * isPlacementDelete (SgDeleteExp *deleteExp)
 
bool isOperatorNew (SgFunctionDeclaration *functionDeclaration)
 
std::vector
< SgFunctionDeclaration * > 
getFunctionsInDerivedClasses (SgClassDefinition *cls, SgFunctionType *funcType, ClassHierarchyWrapper *classHierarchy)
 
std::set< SgFunctionDeclaration * > getFunctionsConsistentWithMethodPointerInvocation (SgBinaryOp *dotStarOrArrowStar, ClassHierarchyWrapper *classHierarchy)
 
SgGlobal * globalScope (SgFile *file)
 
bool isFunc (SgFunctionCallExp *functionCallExp, std::string funcName)
 
template<class T >
void add_sets (std::set< T * > &set1, std::set< T * > set2)
 

Function Documentation

template<class T >
void UseOA::add_sets ( std::set< T * > &  set1,
std::set< T * >  set2 
)
bool UseOA::classHasVirtualMethods ( SgClassDefinition *  classDefinition)

Return true if a class or any of its base classes has a virtual method.

Parameters
classDefinitiona SgNode representing a class definition.
Returns
boolean indicating whether the class represented by classDefinition, or any of its base classes, define a virtual method.

Definition at line 1229 of file common.C.

References isVirtual().

Referenced by SageIRInterface::createImplicitPtrAssignPairsForObjectDeclaration(), and SageIRInterface::createImplicitPtrAssignPairsForVirtualMethods().

Here is the call graph for this function:

bool UseOA::consistentFunctionTypes ( SgFunctionType *  funcType1,
SgFunctionType *  funcType2 
)

Return boolean indicating whether two functions have the same type signature.

Definition at line 1290 of file common.C.

References getBaseType(), and getTypeInfo().

Referenced by getFunctionsInDerivedClasses(), and matchingFunctions().

Here is the call graph for this function:

bool UseOA::findNodeInSubtree ( SgNode *  needle,
SgNode *  haystack 
)

Definition at line 1943 of file common.C.

void UseOA::getActuals ( SgNode *  node,
std::list< SgNode * > &  actuals 
)

Return the actual arguments from a method, which may include a constructor or destructor, or function invocation.

Parameters
nodeA Sage node representing a method or function invocation– i.e., a SgFunctionCallExp, a SgConstructorInitializer, or a SgDeleteExp.
actualArgsOn output, holds the expressions passed as actual arguments to the invocation.

NB: If this is a non-static method invocation, including a constructor or destructor call, then the first actual is the receiver. Yes, the receiver, i.e., the object that is being allocated, is returned for a constructor.

Notice that the receiver may not be a named variable. e.g., (new D)->foo(); bar(new D); return (new D); In each of these cases we return the expression 'new D' as the actual for the implicit receiver.

Definition at line 778 of file common.C.

References isPlacementDelete(), and isPlacementNew().

Referenced by SageIRInterface::getCallsiteParams().

Here is the call graph for this function:

SgClassDeclaration * UseOA::getClassDeclaration ( SgType *  type)

Return the declaration of the class with a given type.

Parameters
typea SgNode representing a type.
Returns
a SgClassDeclaration that is the class declaration for the given type, or NULL if type does not correspond to a class.

Definition at line 1400 of file common.C.

References getDefiningDeclaration().

Referenced by SageIRInterface::createImplicitPtrAssignPairsForDynamicObjectAllocation(), SageIRInterface::createImplicitPtrAssignPairsForObjectDeclaration(), getClassDefinition(), and getFunctionsConsistentWithMethodPointerInvocation().

Here is the call graph for this function:

SgClassDefinition * UseOA::getClassDefinition ( SgType *  type)

Return the definition of the class with a given type.

Parameters
typea SgNode representing a type.
Returns
a SgClassDefinition that is the class definition for the given type, or NULL if type does not correspond to a class.

Definition at line 1489 of file common.C.

References getClassDeclaration().

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns(), and FindCallsitesPass::visit().

Here is the call graph for this function:

SgNode * UseOA::getConstructorInitializerLhs ( SgConstructorInitializer *  ctorInitializer)

Return the lhs of a constructor initializer.

DEPRECATED MMS 9/7/06

Parameters
ctorInitializerA SgConstructorInitializer representing the invocation of a constructor.
Returns
An expression used to represent the this (implicit or explicit) of a constructor invocation.

In the following examples, we return the lhs: Foo f; Foo lhs(f); // copy constructor. Foo lhs; // default constructor. Foo lhs(1); // some other constructor; Foo *lhs = new Foo;

In the following examples, the object constructed is anonymous, so we return that anonymous expression– in these examples, new Foo. return (new Foo); bar(new Foo); (new Foo)->methodCall();

For cases involving the invocation of a baseclass constructor:

class Foo : public Bar { Foo(Foo &f) : Bar(f) { } };

we represent the actual implicit 'this' via a SgExprListExp.

We don't really return an expression. Notice in the first few examples, the only thing we can return is a SgInitializedName.

Definition at line 685 of file common.C.

References isObjectInitialization().

Here is the call graph for this function:

SgClassDeclaration * UseOA::getDefiningDeclaration ( SgClassDeclaration *  classDecl)

Definition at line 1505 of file common.C.

SgFunctionDefinition * UseOA::getEnclosingFunction ( SgNode *  node)

Return the function in which node occurs.

Return the method in which node occurs.

Definition at line 956 of file common.C.

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns(), getThisExpNode(), SageIRInterface::getThisFormalSymHandle(), SageIRInterface::toString(), and SageIRInterface::toStringWithoutScope().

void UseOA::getFormalTypes ( SgNode *  node,
std::vector< SgType * > &  formalTypes 
)

Return a list of the types of the formal parameters involved in a function, method, or constructor invocation.

Parameters
nodea SgNode representing a function/method (SgFunctionCallExp), a constructor (SgConstructorInitializer) invocation, or a destruction (SgDeleteExp) invocation. i.e., node should have a corresponding call handle.
Returns
a list of the types of the formal parameters of the invoked function/method/constructor.

NB: This does not return the type of the implicit formal parameter corresponding to the 'this' pointer. Contrast this with getCallsiteParams which folds the actual corresponding to the 'this' pointer in as the first argument.

Definition at line 386 of file common.C.

References getDefiningDeclaration(), getFunctionDeclaration(), isFunctionPointer(), isPlacementDelete(), isPlacementNew(), lookThruReferenceType(), lookupDestructorInClass(), and verifyCallHandleNodeType().

Referenced by SageIRInterface::createParamBindPtrAssignPairs().

Here is the call graph for this function:

SgFunctionDeclaration * UseOA::getFunctionDeclaration ( SgFunctionCallExp *  functionCall)

Return the SgFunctionDeclaration invoked by a function call.

Parameters
functionCallA SgFunctionCallExp representing a function call site.
Returns
The SgFunctionDeclaration representing the function or method invoked at the call site.

This function does not perform any analysis, therefore it can not determine which function or method is invoked through a pointer. If functionCall is a pointer dereference expression, this function will abort.

Definition at line 191 of file common.C.

Referenced by getFormalTypes().

std::set< SgFunctionDeclaration * > UseOA::getFunctionsConsistentWithMethodPointerInvocation ( SgBinaryOp *  dotStarOrArrowStar,
ClassHierarchyWrapper *  classHierarchy 
)

Return the list of methods that may be called at a method pointer invocation. If the pointer is invoked on a receiver of type T, the conservative set of methods that may be invoked include any non-static, virtual or non-virtual method m with type signature consistent with the method pointer that is defined in a class C. C is any class derived from any of the ancestors of T.

Definition at line 2067 of file common.C.

References getClassDeclaration(), getDefiningDeclaration(), getFunctionsInDerivedClasses(), and isNonStaticMethod().

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns().

Here is the call graph for this function:

std::vector<SgFunctionDeclaration *> UseOA::getFunctionsInDerivedClasses ( SgClassDefinition *  cls,
SgFunctionType *  funcType,
ClassHierarchyWrapper *  classHierarchy 
)

Return any function declarations defined in cls or any of its derived classes, which have a function signature consistent with funcType.

Definition at line 2009 of file common.C.

References consistentFunctionTypes().

Referenced by getFunctionsConsistentWithMethodPointerInvocation().

Here is the call graph for this function:

SgMemberFunctionDeclaration * UseOA::getInvokedMethod ( SgMemberFunctionRefExp *  memberFunctionRefExp)

Definition at line 1760 of file common.C.

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns().

SgNode * UseOA::getThisExpNode ( SgNode *  node)

Return a SgNode representing a 'this' expression.

Parameters
nodeA SgNode from which we would like to derive a SgNode for a 'this' expression.
Returns
A SymHandle representing a 'this' expression corresponding to the method or SgThisExp represented by node.

node should be either a SgMemberFunctionDeclaration or a SgThisExp.

We use the SgFunctionParameterList from the enclosing method to represent the method-specific 'this' expression. NB: Using a class-wide 'this' expression (e.g., a SgClassSymbol) would lead to loss of precision.

Definition at line 1620 of file common.C.

References getEnclosingFunction().

Referenced by SageIRInterface::getThisExpSymHandle().

Here is the call graph for this function:

void UseOA::getTypeInfo ( SgType *  t,
std::string *  tname,
std::string *  stripname,
int *  size 
)

Return a type's name and size.

Parameters
tA Sage type.
tnameOn output, holds the string name of the type.
stripnameOn output, holds the string name of the type, stripped of any "const" prefix.
sizeOn output, holds the size? I don't know what this size corresponds to. Certainly not the size of the type (which needn't be a word) or string.

This was copied from .../ROSE/src/midend/astUtil/astInterface/AstInterface.C

To do: move this to a generally-accessible utilities file or make it accessible from AstInterface (by adding its declaration to AstInterface.h).

Definition at line 48 of file common.C.

References stripParameterType().

Referenced by consistentFunctionTypes(), mangleFunctionName(), and UseOA::eqTypes::operator()().

Here is the call graph for this function:

SgGlobal * UseOA::globalScope ( SgFile *  file)

Definition at line 2149 of file common.C.

bool UseOA::hasDefinition ( SgFunctionDeclaration *  functionDeclaration)
bool UseOA::isArrowExp ( SgExpression *  function)

Returns true if function is a SgArrowExp or a SgDotExp whose operand is a SgPointerDerefExp or a SgDotExp whose lhs is a reference. In this latter case we will convert the lhs to appear as a pointer. i.e., returns true if function represents a->method() or (*a).method().

Definition at line 1909 of file common.C.

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns().

bool UseOA::isBaseClassInvocation ( SgConstructorInitializer *  ctorInitializer)

Definition at line 1709 of file common.C.

References getBaseType().

Referenced by SageIRInterface::createConstructorInitializerReceiverMRE(), and isObjectInitialization().

Here is the call graph for this function:

bool UseOA::isConstructor ( SgMemberFunctionDeclaration *  memberFunctionDeclaration)

Returns true if the method is a constructor.

Parameters
memberFunctionDeclarationA method declaration.
Returns
Boolean indicating whether methodFunctionDeclaration is a constructor.

Definition at line 1134 of file common.C.

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns(), and isVirtual().

static bool UseOA::isDeclaredVirtualWithinAncestor ( SgFunctionDeclaration *  functionDeclaration)
static

Return boolean indicating whether a function is declared virtual in some parent class, regardless of whether it is declared virtual in its defining class.

Parameters
functionDeclarationA function declaration within the AST.
Returns
Boolean indicating whether functionDeclaration is virtual.

Definition at line 1113 of file common.C.

References isDeclaredVirtualWithinClassAncestry().

Referenced by isVirtual().

Here is the call graph for this function:

bool UseOA::isDeclaredVirtualWithinClassAncestry ( SgFunctionDeclaration *  functionDeclaration,
SgClassDefinition *  classDefinition 
)

Return boolean indicating whether a function is declared virtual in some parent class of SgClassDefinition.

Parameters
functionDeclarationA function declaration within the AST.
Returns
Boolean indicating whether functionDeclaration is virtual.

Definition at line 1027 of file common.C.

References getDefiningDeclaration(), and isVirtual().

Referenced by isDeclaredVirtualWithinAncestor().

Here is the call graph for this function:

bool UseOA::isDestructor ( SgMemberFunctionDeclaration *  memberFunctionDeclaration)

Returns true if the method is a destructor.

Parameters
memberFunctionDeclarationA method declaration.
Returns
Boolean indicating whether methodFunctionDeclaration is a destructor.

Definition at line 600 of file common.C.

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns(), and lookupDestructorInClass().

bool UseOA::isFunc ( SgFunctionCallExp *  functionCallExp,
std::string  funcName 
)
bool UseOA::isFunc ( SgFunctionCallExp *  functionCallExp,
::std::string  funcName 
)

Returns boolean indicating whether the invoked function has name funcName.

Parameters
functionCallExpA SgFunctionCallExp representing an invoked function.
funcNameA string representing the name of a function.
Returns
Boolean indicating whether the name of the invoked function is funcName.

Definition at line 1518 of file common.C.

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns(), and isVaStart().

SgPointerDerefExp * UseOA::isFunctionPointer ( SgFunctionCallExp *  functionCall)

Returns a SgPointerDerefExp if the function call is made through a pointer and NULL otherwise.

Definition at line 155 of file common.C.

Referenced by getFormalTypes().

bool UseOA::isNonStaticMethod ( SgMemberFunctionDeclaration *  memberFunctionDecl)

isNonStaticMethod returns boolen indicating whether the method is a non-static method.

Definition at line 1783 of file common.C.

Referenced by SageIRInterface::getFormalParamIterator(), and getFunctionsConsistentWithMethodPointerInvocation().

bool UseOA::isNonStaticMethodCall ( SgFunctionCallExp *  functionCall,
bool &  isDotExp 
)

isNonStaticMethodCall returns true if the invoked procedure is a method (i.e., a constructor, a destructor, or a non-static method).

Parameters
functionCallA Sage node representing a function call expression.
isDotExpOn output, a boolean indicating whether the receiver of a method invocation is an object (isDotExp = true) or a pointer (isDotExp = false).
Returns
Boolean indicating whether the invoked procedure is a method.

Be Careful! For the purposes of isNonStaticMethodCall a method is anything which has or creates a receiver/"this." That is a constructor (which creates a this and may modify/initialization it), a destructor, or a non-static method. Each of these is passed an implicit "this" parameter. A static method may only access static member variables, therefore we need not pass an implicit "this" (which is convenient, since we don't have one).

Definition at line 87 of file common.C.

Referenced by SageIRInterface::createParamBindPtrAssignPairs().

bool UseOA::isObjectInitialization ( SgConstructorInitializer *  ctorInitializer)

Return boolean indicating whether the SgConstructorInitializer initializes an object.

Parameters
ctorInitializerA SgConstructorInitializer.
Returns
Boolean indicating whether ctorInitializer initializes an object.

The following are object initializations: Foo f; Foo(Bar &b) : mBar(b) { }

The following are not: Foo *f = new Foo; class Foo : public Bar { Foo(Foo &f) : Bar(f) { } }

Notice that the Bar in Bar(f) in the initializer is represented by a SgInitializedName, whose name is 'Bar'. Thus if the name of the SgInitializedName and of the invoked constructor are the same, this is an invocation of a base class constructor.

Definition at line 1693 of file common.C.

References isBaseClassInvocation().

Referenced by SageIRInterface::createParamBindPtrAssignPairs(), and getConstructorInitializerLhs().

Here is the call graph for this function:

bool UseOA::isOperatorNew ( SgFunctionDeclaration *  functionDeclaration)
bool UseOA::isPureVirtual ( SgFunctionDeclaration *  functionDeclaration)

Returns true if method is a pure virtual method.

Parameters
functionDeclarationA method declaration.
Returns
Boolean indicating whether method is a pure virtual method.

Definition at line 1181 of file common.C.

Referenced by SageIRInterface::createImplicitPtrAssignPairsForClassDefinition(), and SageIRInterface::createImplicitPtrAssignPairsForVirtualMethods().

bool UseOA::isVaStart ( SgFunctionCallExp *  functionCallExp)

Return boolean indicating whether the invoked function is va_start.

Definition at line 1793 of file common.C.

References isFunc().

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns(), and FindCallsitesPass::visit().

Here is the call graph for this function:

bool UseOA::isVirtual ( SgFunctionDeclaration *  functionDeclaration)

Return boolean indicating whether a function is virtual– i.e., whether it is declared virtual in its defining class or any of that class' base classes.

Definition at line 1151 of file common.C.

References isConstructor(), isDeclaredVirtualWithinAncestor(), and isVirtualWithinDefiningClass().

Referenced by classHasVirtualMethods(), SageIRInterface::createImplicitPtrAssignPairsForClassDefinition(), SageIRInterface::createImplicitPtrAssignPairsForVirtualMethods(), SageIRInterface::findAllMemRefsAndPtrAssigns(), and isDeclaredVirtualWithinClassAncestry().

Here is the call graph for this function:

static bool UseOA::isVirtualWithinDefiningClass ( SgFunctionDeclaration *  functionDeclaration)
static

Return boolean indicating whether a function is declared virtual in its defining class.

Parameters
functionDeclarationA function declaration within the AST.
Returns
Boolean indicating whether functionDeclaration is virtual.

Definition at line 993 of file common.C.

Referenced by isVirtual().

SgMemberFunctionDeclaration * UseOA::lookupDestructorInClass ( SgClassDefinition *  classDefinition)

Returns a destructor method declaration within a class if it exists.

Parameters
classDefinitiona SgNode representing a class definition.
Returns
A SgMemberFunctionDeclaration from classDefinition that representing a destructor, or NULL if it is not defined.

Definition at line 619 of file common.C.

References isDestructor().

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns(), getFormalTypes(), and FindCallsitesPass::visit().

Here is the call graph for this function:

std::string UseOA::mangleFunctionName ( SgFunctionDeclaration *  functionDeclaration)

Return a function's mangled name.

We do not rely on ROSE's funcDecl->get_mangled_name().str() because it will include the class scope information for a member function. This will undermine its use in a virtual method field because we want a single field to be able to point to any of a number of virtual methods defined/declared within a class hierarchy.

For now, just include the function name and the return and formal types, each separated by an underscore. This may not be sufficient to capture, e.g., template info.

Definition at line 1366 of file common.C.

References getBaseType(), and getTypeInfo().

Referenced by SageIRInterface::createImplicitPtrAssignPairsForClassDefinition(), SageIRInterface::createImplicitPtrAssignPairsForVirtualMethods(), and SageIRInterface::toStringWithoutScope().

Here is the call graph for this function:

bool UseOA::matchingFunctions ( SgFunctionDeclaration *  decl1,
SgFunctionDeclaration *  decl2 
)
bool UseOA::returnsAddress ( SgFunctionCallExp *  functionCallExp)

Definition at line 1570 of file common.C.

References getBaseType().

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns().

Here is the call graph for this function:

bool UseOA::returnsReference ( SgFunctionCallExp *  functionCallExp)

Definition at line 1539 of file common.C.

Referenced by SageIRInterface::findAllMemRefsAndPtrAssigns().

static std::string UseOA::stripParameterType ( const std::string &  name)
static

Strip the "const" keyword from a string.

Parameters
nameA string (intending to represent a formal parameter type).
Returns
A string holding name stripped of the "const" prefix.

This was copied from .../ROSE/src/midend/astUtil/astInterface/AstInterface.C

To do: move this to a generally-accessible utilities file or make it accessible from AstInterface (by adding its declaration to AstInterface.h).

Definition at line 18 of file common.C.

Referenced by getTypeInfo().

void UseOA::verifyCallHandleNodeType ( SgNode *  node)

Verify that a node intended to be used as a call handle is one of the expected node types for a call handle.

Definition at line 258 of file common.C.

References isPlacementDelete(), and isPlacementNew().

Referenced by SageIRInterface::createParamBindPtrAssignPairs(), getFormalTypes(), and SageIRInterface::verifyCallHandleType().

Here is the call graph for this function:

void UseOA::verifyStmtHandleNodeType ( SgNode *  node)

Verify that a node intended to be used as a stmt handle is one of the expected node types for a stmt handle.

Definition at line 320 of file common.C.

Referenced by SageIRInterface::verifyStmtHandleType().

void UseOA::verifySymHandleNodeType ( SgNode *  node)

Verify that a node intended to be used as a sym handle is one of the expected node types for a sym handle.

Definition at line 345 of file common.C.

Referenced by SageIRInterface::getSymHandle().