Ignore:
Timestamp:
Oct 27, 2016, 4:22:27 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0ebac75
Parents:
d93d980
Message:

Removed warnings when compiling with clang

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    rd93d980 r62e5546  
    3636        }
    3737
    38         class ReturnFixer : public GenPoly::PolyMutator {
     38        class ReturnFixer final : public GenPoly::PolyMutator {
    3939          public:
    4040                /// consistently allocates a temporary variable for the return value
     
    4545                ReturnFixer();
    4646
    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;
    5050
    5151          protected:
     
    5555        };
    5656
    57         class CtorDtor : public GenPoly::PolyMutator {
     57        class CtorDtor final : public GenPoly::PolyMutator {
    5858          public:
    5959                typedef GenPoly::PolyMutator Parent;
     
    6565                static void generateCtorDtor( std::list< Declaration * > &translationUnit );
    6666
    67                 virtual DeclarationWithType * mutate( ObjectDecl * );
    68                 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
     67                virtual DeclarationWithType * mutate( ObjectDecl * ) override;
     68                virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override;
    6969                // should not traverse into any of these declarations to find objects
    7070                // 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;
    8181
    8282          private:
     
    9191        };
    9292
    93         class HoistArrayDimension : public GenPoly::DeclMutator {
     93        class HoistArrayDimension final : public GenPoly::DeclMutator {
    9494          public:
    9595                typedef GenPoly::DeclMutator Parent;
     
    101101
    102102          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;
    105107                // should not traverse into any of these declarations to find objects
    106108                // 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; }
    115117
    116118                void hoist( Type * type );
Note: See TracChangeset for help on using the changeset viewer.