MarkAsCompilerGenerated
Mark an AST subtree as compiler generated (used for instatiated templates generated by ROSE as specializations).
Synopsis
Declared in <SageIII/astPostProcessing/markCompilerGenerated.h>
class MarkAsCompilerGenerated
: public SgSimpleProcessing
Base Classes
Name |
Description |
Member Functions
Name |
Description |
|
Required traversal function |
Static Member Functions
Name |
Description |
static function used in both AST fixup and in AST consistancy tests |
Description
Template instatiation is handled by ROSE and legacy frontend though the translation of instatiations to be template specializations. When output as specializations they are generated code (not appearing in the original source code). Since legacy frontend recordes the position of the instatiated template as the location of the original template declaration (which could be in a different file) the unparser can skip over the output of such parts of the AST (since we only output the code associated with the original source file as a way of stripping off all the headers files that would otherwise be prepended to the source code).
Note that it sould not be sufficient to mark the generated
template specializations as transformations since then all template
specializations wuld be output (only user transformed template
specializations should be output).
Created with MrDocs