Changes in src/InitTweak/GenInit.cc [dcd73d1:62e5546]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/GenInit.cc
rdcd73d1 r62e5546 36 36 } 37 37 38 class ReturnFixer : public GenPoly::PolyMutator {38 class ReturnFixer final : public GenPoly::PolyMutator { 39 39 public: 40 40 /// consistently allocates a temporary variable for the return value … … 45 45 ReturnFixer(); 46 46 47 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );48 49 virtual Statement * mutate( ReturnStmt * returnStmt ) ;47 using GenPoly::PolyMutator::mutate; 48 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override; 49 virtual Statement * mutate( ReturnStmt * returnStmt ) override; 50 50 51 51 protected: … … 55 55 }; 56 56 57 class CtorDtor : public GenPoly::PolyMutator {57 class CtorDtor final : public GenPoly::PolyMutator { 58 58 public: 59 59 typedef GenPoly::PolyMutator Parent; … … 65 65 static void generateCtorDtor( std::list< Declaration * > &translationUnit ); 66 66 67 virtual DeclarationWithType * mutate( ObjectDecl * ) ;68 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) ;67 virtual DeclarationWithType * mutate( ObjectDecl * ) override; 68 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override; 69 69 // should not traverse into any of these declarations to find objects 70 70 // that need to be constructed or destructed 71 virtual Declaration* mutate( StructDecl *aggregateDecl ) ;72 virtual Declaration* mutate( UnionDecl *aggregateDecl ) { return aggregateDecl; }73 virtual Declaration* mutate( EnumDecl *aggregateDecl ) { return aggregateDecl; }74 virtual Declaration* mutate( TraitDecl *aggregateDecl ) { return aggregateDecl; }75 virtual TypeDecl* mutate( TypeDecl *typeDecl ) { return typeDecl; }76 virtual Declaration* mutate( TypedefDecl *typeDecl ) { return typeDecl; }77 78 virtual Type * mutate( FunctionType *funcType ) { return funcType; }79 80 virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) ;71 virtual Declaration* mutate( StructDecl *aggregateDecl ) override; 72 virtual Declaration* mutate( UnionDecl *aggregateDecl ) override { return aggregateDecl; } 73 virtual Declaration* mutate( EnumDecl *aggregateDecl ) override { return aggregateDecl; } 74 virtual Declaration* mutate( TraitDecl *aggregateDecl ) override { return aggregateDecl; } 75 virtual TypeDecl* mutate( TypeDecl *typeDecl ) override { return typeDecl; } 76 virtual Declaration* mutate( TypedefDecl *typeDecl ) override { return typeDecl; } 77 78 virtual Type * mutate( FunctionType *funcType ) override { return funcType; } 79 80 virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) override; 81 81 82 82 private: … … 91 91 }; 92 92 93 class HoistArrayDimension : public GenPoly::DeclMutator {93 class HoistArrayDimension final : public GenPoly::DeclMutator { 94 94 public: 95 95 typedef GenPoly::DeclMutator Parent; … … 101 101 102 102 private: 103 virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ); 104 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ); 103 using Parent::mutate; 104 105 virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) override; 106 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override; 105 107 // should not traverse into any of these declarations to find objects 106 108 // that need to be constructed or destructed 107 virtual Declaration* mutate( StructDecl *aggregateDecl ) { return aggregateDecl; }108 virtual Declaration* mutate( UnionDecl *aggregateDecl ) { return aggregateDecl; }109 virtual Declaration* mutate( EnumDecl *aggregateDecl ) { return aggregateDecl; }110 virtual Declaration* mutate( TraitDecl *aggregateDecl ) { return aggregateDecl; }111 virtual TypeDecl* mutate( TypeDecl *typeDecl ) { return typeDecl; }112 virtual Declaration* mutate( TypedefDecl *typeDecl ) { return typeDecl; }113 114 virtual Type* mutate( FunctionType *funcType ) { return funcType; }109 virtual Declaration* mutate( StructDecl *aggregateDecl ) override { return aggregateDecl; } 110 virtual Declaration* mutate( UnionDecl *aggregateDecl ) override { return aggregateDecl; } 111 virtual Declaration* mutate( EnumDecl *aggregateDecl ) override { return aggregateDecl; } 112 virtual Declaration* mutate( TraitDecl *aggregateDecl ) override { return aggregateDecl; } 113 virtual TypeDecl* mutate( TypeDecl *typeDecl ) override { return typeDecl; } 114 virtual Declaration* mutate( TypedefDecl *typeDecl ) override { return typeDecl; } 115 116 virtual Type* mutate( FunctionType *funcType ) override { return funcType; } 115 117 116 118 void hoist( Type * type );
Note:
See TracChangeset
for help on using the changeset viewer.