Changeset 7e003011 for src/InitTweak


Ignore:
Timestamp:
Jun 5, 2017, 1:59:11 PM (7 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:
7b13aeb
Parents:
b3c36f4
Message:

Some more unused argument removal, also removed some functions

Location:
src/InitTweak
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixGlobalInit.cc

    rb3c36f4 r7e003011  
    129129
    130130        // only modify global variables
    131         void GlobalFixer::visit( FunctionDecl *functionDecl ) {}
    132         void GlobalFixer::visit( StructDecl *aggregateDecl ) {}
    133         void GlobalFixer::visit( UnionDecl *aggregateDecl ) {}
    134         void GlobalFixer::visit( EnumDecl *aggregateDecl ) {}
    135         void GlobalFixer::visit( TraitDecl *aggregateDecl ) {}
    136         void GlobalFixer::visit( TypeDecl *typeDecl ) {}
     131        void GlobalFixer::visit( __attribute__((unused)) FunctionDecl *functionDecl ) {}
     132        void GlobalFixer::visit( __attribute__((unused)) StructDecl *aggregateDecl ) {}
     133        void GlobalFixer::visit( __attribute__((unused)) UnionDecl *aggregateDecl ) {}
     134        void GlobalFixer::visit( __attribute__((unused)) EnumDecl *aggregateDecl ) {}
     135        void GlobalFixer::visit( __attribute__((unused)) TraitDecl *aggregateDecl ) {}
     136        void GlobalFixer::visit( __attribute__((unused)) TypeDecl *typeDecl ) {}
    137137
    138138} // namespace InitTweak
  • src/InitTweak/FixInit.cc

    rb3c36f4 r7e003011  
    110110
    111111                        // don't go into other functions
    112                         virtual void visit( FunctionDecl *decl ) override {}
     112                        virtual void visit( __attribute__((unused)) FunctionDecl *decl ) override {}
    113113
    114114                  protected:
  • src/InitTweak/InitTweak.cc

    rb3c36f4 r7e003011  
    9292                InitImpl( Initializer * init ) : init( init ) {}
    9393
    94                 virtual std::list< Expression * > next( std::list< Expression * > & indices ) {
     94                virtual std::list< Expression * > next( __attribute((unused)) std::list< Expression * > & indices ) {
    9595                        // this is wrong, but just a placeholder for now
    9696                        // if ( ! flattened ) flatten( indices );
     
    248248        }
    249249
    250         Statement * ExprImpl::buildListInit( UntypedExpr * dst, std::list< Expression * > & indices ) {
     250        Statement * ExprImpl::buildListInit( __attribute((unused)) UntypedExpr * dst, __attribute((unused)) std::list< Expression * > & indices ) {
    251251                return NULL;
    252252        }
     
    475475                ConstExprChecker() : isConstExpr( true ) {}
    476476
    477                 virtual void visit( ApplicationExpr *applicationExpr ) { isConstExpr = false; }
    478                 virtual void visit( UntypedExpr *untypedExpr ) { isConstExpr = false; }
     477                virtual void visit( __attribute((unused)) ApplicationExpr *applicationExpr ) { isConstExpr = false; }
     478                virtual void visit( __attribute((unused)) UntypedExpr *untypedExpr ) { isConstExpr = false; }
    479479                virtual void visit( NameExpr *nameExpr ) {
    480480                        // xxx - temporary hack, because 0 and 1 really should be constexprs, even though they technically aren't in Cforall today
     
    487487                        if ( ! dynamic_cast< NameExpr * >( arg) && ! dynamic_cast< VariableExpr * >( arg ) && ! dynamic_cast< MemberExpr * >( arg ) && ! dynamic_cast< UntypedMemberExpr * >( arg ) ) isConstExpr = false;
    488488                }
    489                 virtual void visit( LabelAddressExpr *labAddressExpr ) { isConstExpr = false; }
    490                 virtual void visit( UntypedMemberExpr *memberExpr ) { isConstExpr = false; }
    491                 virtual void visit( MemberExpr *memberExpr ) { isConstExpr = false; }
    492                 virtual void visit( VariableExpr *variableExpr ) { isConstExpr = false; }
     489                virtual void visit( __attribute((unused)) LabelAddressExpr *labAddressExpr ) { isConstExpr = false; }
     490                virtual void visit( __attribute((unused)) UntypedMemberExpr *memberExpr ) { isConstExpr = false; }
     491                virtual void visit( __attribute((unused)) MemberExpr *memberExpr ) { isConstExpr = false; }
     492                virtual void visit( __attribute((unused)) VariableExpr *variableExpr ) { isConstExpr = false; }
    493493                // these might be okay?
    494494                // virtual void visit( SizeofExpr *sizeofExpr );
     
    501501                // virtual void visit( LogicalExpr *logicalExpr );
    502502                // virtual void visit( ConditionalExpr *conditionalExpr );
    503                 virtual void visit( TypeExpr *typeExpr ) { isConstExpr = false; }
    504                 virtual void visit( AsmExpr *asmExpr ) { isConstExpr = false; }
    505                 virtual void visit( UntypedValofExpr *valofExpr ) { isConstExpr = false; }
    506                 virtual void visit( CompoundLiteralExpr *compLitExpr ) { isConstExpr = false; }
    507                 virtual void visit( UntypedTupleExpr *tupleExpr ) { isConstExpr = false; }
    508                 virtual void visit( TupleExpr *tupleExpr ) { isConstExpr = false; }
    509                 virtual void visit( TupleAssignExpr *tupleExpr ) { isConstExpr = false; }
     503                virtual void visit( __attribute((unused)) TypeExpr *typeExpr ) { isConstExpr = false; }
     504                virtual void visit( __attribute((unused)) AsmExpr *asmExpr ) { isConstExpr = false; }
     505                virtual void visit( __attribute((unused)) UntypedValofExpr *valofExpr ) { isConstExpr = false; }
     506                virtual void visit( __attribute((unused)) CompoundLiteralExpr *compLitExpr ) { isConstExpr = false; }
     507                virtual void visit( __attribute((unused)) UntypedTupleExpr *tupleExpr ) { isConstExpr = false; }
     508                virtual void visit( __attribute((unused)) TupleExpr *tupleExpr ) { isConstExpr = false; }
     509                virtual void visit( __attribute((unused)) TupleAssignExpr *tupleExpr ) { isConstExpr = false; }
    510510
    511511                bool isConstExpr;
Note: See TracChangeset for help on using the changeset viewer.