Changeset 7e003011 for src/InitTweak
- Timestamp:
- Jun 5, 2017, 1:59:11 PM (7 years ago)
- 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
- Location:
- src/InitTweak
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixGlobalInit.cc
rb3c36f4 r7e003011 129 129 130 130 // 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 ) {} 137 137 138 138 } // namespace InitTweak -
src/InitTweak/FixInit.cc
rb3c36f4 r7e003011 110 110 111 111 // don't go into other functions 112 virtual void visit( FunctionDecl *decl ) override {}112 virtual void visit( __attribute__((unused)) FunctionDecl *decl ) override {} 113 113 114 114 protected: -
src/InitTweak/InitTweak.cc
rb3c36f4 r7e003011 92 92 InitImpl( Initializer * init ) : init( init ) {} 93 93 94 virtual std::list< Expression * > next( std::list< Expression * > & indices ) {94 virtual std::list< Expression * > next( __attribute((unused)) std::list< Expression * > & indices ) { 95 95 // this is wrong, but just a placeholder for now 96 96 // if ( ! flattened ) flatten( indices ); … … 248 248 } 249 249 250 Statement * ExprImpl::buildListInit( UntypedExpr * dst,std::list< Expression * > & indices ) {250 Statement * ExprImpl::buildListInit( __attribute((unused)) UntypedExpr * dst, __attribute((unused)) std::list< Expression * > & indices ) { 251 251 return NULL; 252 252 } … … 475 475 ConstExprChecker() : isConstExpr( true ) {} 476 476 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; } 479 479 virtual void visit( NameExpr *nameExpr ) { 480 480 // xxx - temporary hack, because 0 and 1 really should be constexprs, even though they technically aren't in Cforall today … … 487 487 if ( ! dynamic_cast< NameExpr * >( arg) && ! dynamic_cast< VariableExpr * >( arg ) && ! dynamic_cast< MemberExpr * >( arg ) && ! dynamic_cast< UntypedMemberExpr * >( arg ) ) isConstExpr = false; 488 488 } 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; } 493 493 // these might be okay? 494 494 // virtual void visit( SizeofExpr *sizeofExpr ); … … 501 501 // virtual void visit( LogicalExpr *logicalExpr ); 502 502 // 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; } 510 510 511 511 bool isConstExpr;
Note: See TracChangeset
for help on using the changeset viewer.