Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    rbd7e609 r60c3b06c  
    153153                void previsit( ObjectDecl * object );
    154154                void previsit( FunctionDecl * func );
    155                 void previsit( StructDecl * aggrDecl );
    156                 void previsit( UnionDecl * aggrDecl );
    157155        };
    158156
     
    272270                acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist
    273271                VerifyCtorDtorAssign::verify( translationUnit );  // must happen before autogen, because autogen examines existing ctor/dtors
    274                 ReturnChecker::checkFunctionReturns( translationUnit );
    275                 InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen
    276272                Concurrency::applyKeywords( translationUnit );
    277                 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution
    278273                autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay
    279274                Concurrency::implementMutexFuncs( translationUnit );
    280275                Concurrency::implementThreadStarter( translationUnit );
     276                ReturnChecker::checkFunctionReturns( translationUnit );
    281277                mutateAll( translationUnit, compoundliteral );
     278                acceptAll( translationUnit, fpd );
    282279                ArrayLength::computeLength( translationUnit );
    283                 acceptAll( translationUnit, finder ); // xxx - remove this pass soon
     280                acceptAll( translationUnit, finder );
    284281                mutateAll( translationUnit, labelAddrFixer );
    285282        }
     
    372369                        DWTIterator begin( dwts.begin() ), end( dwts.end() );
    373370                        if ( begin == end ) return;
    374                         PassVisitor<FixFunction> fixer;
     371                        FixFunction fixer;
    375372                        DWTIterator i = begin;
    376373                        *i = (*i)->acceptMutator( fixer );
    377                         if ( fixer.pass.isVoid ) {
     374                        if ( fixer.get_isVoid() ) {
    378375                                DWTIterator j = i;
    379376                                ++i;
     
    386383                                ++i;
    387384                                for ( ; i != end; ++i ) {
    388                                         PassVisitor<FixFunction> fixer;
     385                                        FixFunction fixer;
    389386                                        *i = (*i)->acceptMutator( fixer );
    390                                         if ( fixer.pass.isVoid ) {
     387                                        if ( fixer.get_isVoid() ) {
    391388                                                throw SemanticError( "invalid type void in function type ", func );
    392389                                        } // if
     
    600597                        // apply FixFunction to every assertion to check for invalid void type
    601598                        for ( DeclarationWithType *& assertion : type->assertions ) {
    602                                 PassVisitor<FixFunction> fixer;
     599                                FixFunction fixer;
    603600                                assertion = assertion->acceptMutator( fixer );
    604                                 if ( fixer.pass.isVoid ) {
     601                                if ( fixer.get_isVoid() ) {
    605602                                        throw SemanticError( "invalid type void in assertion of function ", node );
    606603                                } // if
     
    621618                forallFixer( func->type->forall, func );
    622619                func->fixUniqueId();
    623         }
    624 
    625         void ForallPointerDecay::previsit( StructDecl * aggrDecl ) {
    626                 forallFixer( aggrDecl->parameters, aggrDecl );
    627         }
    628 
    629         void ForallPointerDecay::previsit( UnionDecl * aggrDecl ) {
    630                 forallFixer( aggrDecl->parameters, aggrDecl );
    631620        }
    632621
Note: See TracChangeset for help on using the changeset viewer.