Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    rb2da0574 r0f40912  
    148148                void previsit( ObjectDecl * object );
    149149                void previsit( FunctionDecl * func );
    150                 void previsit( FunctionType * ftype );
    151150                void previsit( StructDecl * aggrDecl );
    152151                void previsit( UnionDecl * aggrDecl );
     
    316315
    317316        void HoistStruct::previsit( EnumInstType * inst ) {
    318                 if ( inst->baseEnum && inst->baseEnum->body ) {
     317                if ( inst->baseEnum ) {
    319318                        declsToAddBefore.push_front( inst->baseEnum );
    320319                }
     
    322321
    323322        void HoistStruct::previsit( StructInstType * inst ) {
    324                 if ( inst->baseStruct && inst->baseStruct->body ) {
     323                if ( inst->baseStruct ) {
    325324                        declsToAddBefore.push_front( inst->baseStruct );
    326325                }
     
    328327
    329328        void HoistStruct::previsit( UnionInstType * inst ) {
    330                 if ( inst->baseUnion && inst->baseUnion->body ) {
     329                if ( inst->baseUnion ) {
    331330                        declsToAddBefore.push_front( inst->baseUnion );
    332331                }
     
    634633
    635634        void ForallPointerDecay::previsit( ObjectDecl *object ) {
     635                forallFixer( object->type->forall, object );
     636                if ( PointerType *pointer = dynamic_cast< PointerType * >( object->type ) ) {
     637                        forallFixer( pointer->base->forall, object );
     638                } // if
    636639                // ensure that operator names only apply to functions or function pointers
    637640                if ( CodeGen::isOperator( object->name ) && ! dynamic_cast< FunctionType * >( object->type->stripDeclarator() ) ) {
     
    642645
    643646        void ForallPointerDecay::previsit( FunctionDecl *func ) {
     647                forallFixer( func->type->forall, func );
    644648                func->fixUniqueId();
    645         }
    646 
    647         void ForallPointerDecay::previsit( FunctionType * ftype ) {
    648                 forallFixer( ftype->forall, ftype );
    649649        }
    650650
Note: See TracChangeset for help on using the changeset viewer.