Class ResetParentPointers#
Defined in File resetParentPointers.h
Inheritance Relationships#
Base Type#
public SgTopDownProcessing< ResetParentPointersInheritedAttribute >(Template Class SgTopDownProcessing)
Class Documentation#
-
class ResetParentPointers : public SgTopDownProcessing<ResetParentPointersInheritedAttribute>#
This traversal implements the mechanism to reset all parent pointers (back edges in the AST graph)
This traversal traverses the whole AST except types and symbols (future versions of the traversal will traverse type and symbols)
Public Functions
-
ResetParentPointersInheritedAttribute evaluateInheritedAttribute(SgNode *node, ResetParentPointersInheritedAttribute inheritedAttribute)#
This stores debugging output.
This list of strings can be output as debugging information (in the future) about what nodes had to be reset from unexpected values. Required traversal function
-
void traceBackToRoot(SgNode *node)#
Test function to test parent pointers (from any point back to the root)
-
void resetParentPointersInType(SgType *typeNode, SgNode *previousNode)#
resets pointers in islands of AST code not currently traversed (hidden in types or arrays of types)
-
void resetParentPointersInDeclaration(SgDeclarationStatement *declaration, SgNode *inputParent)#
Reset parents of referenced defining and first non-defining declaration.
SgDeclarationStatement objects contain references to the defining and first non-defining declarations, both should have their parents set. In general this will be sufficient to set all the associated declarations used internally is they are shared. Declaration statements that are explicit forward declarations are however not all referencing the first non-defining declaration (since this would violate the rule of uniqueness of statements (only enforced within a single scope).
-
void resetParentPointersInTemplateArgumentList(const SgTemplateArgumentPtrList &templateArgList)#
Reset parent pointers appearing in subtrees represnting the template arguments.
This function traverses the list of template arguments and looks for SgNameTypes and reset the parents in their associated declarations.
-
ResetParentPointersInheritedAttribute evaluateInheritedAttribute(SgNode *node, ResetParentPointersInheritedAttribute inheritedAttribute)#