Skip to content

FixupEnumValues

This traversal uses the Memory Pool traversal to fixup the enum declarations referenced in the enum values (SgEnumVal).

Synopsis

Declared in <SageIII/astFixup/fixupEnumValues.h>

class FixupEnumValues
    : public ROSE_VisitTraversal

Base Classes

Name

Description

ROSE_VisitTraversal

Member Functions

Name

Description

~FixupEnumValues [destructor] [virtual]

Destructor

visit [virtual]

Required traversal function

Description

This traversal fixes any NULL declarations to SgEnumDeclaration held in the SgEnumVal. These can be NULL when the enum value is referenced in a class before it is seen in that class (allowed in C++, but a difficult detail to handle sometimes). In this case I am unable to find the required legacy frontend information so that I can build the enum declaration when I see the enum value so I build the enum value with a NULL pointer to the declaration and we fix it up here. See test2007_83.C for an example of this.

It is not clear that we can always resolve what enum declaration might be referenced. We need to check this out. Using directives could make this very difficult. At the moment we search in the class, clearly that is not good enough generally.

Created with MrDocs