Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r5fe35d6 rddae809  
    943943                }
    944944
     945                void addIds( SymTab::Indexer & indexer, const std::list< DeclarationWithType * > & decls ) {
     946                        for ( auto d : decls ) {
     947                                indexer.addId( d );
     948                        }
     949                }
     950
     951                void addTypes( SymTab::Indexer & indexer, const std::list< TypeDecl * > & tds ) {
     952                        for ( auto td : tds ) {
     953                                indexer.addType( td );
     954                                addIds( indexer, td->assertions );
     955                        }
     956                }
     957
    945958                void GenStructMemberCalls::previsit( FunctionDecl * funcDecl ) {
    946959                        GuardValue( function );
     
    9991012                                // need to explicitly re-add function parameters to the indexer in order to resolve copy constructors
    10001013                                auto guard = makeFuncGuard( [this]() { indexer.enterScope(); }, [this]() { indexer.leaveScope(); } );
    1001                                 indexer.addFunctionType( function->type );
     1014                                addTypes( indexer, function->type->forall );
     1015                                addIds( indexer, function->type->returnVals );
     1016                                addIds( indexer, function->type->parameters );
    10021017
    10031018                                // need to iterate through members in reverse in order for
     
    10141029                                        // insert and resolve default/copy constructor call for each field that's unhandled
    10151030                                        std::list< Statement * > stmt;
    1016                                         Expression * arg2 = nullptr;
     1031                                        Expression * arg2 = 0;
    10171032                                        if ( isCopyConstructor( function ) ) {
    10181033                                                // if copy ctor, need to pass second-param-of-this-function.field
Note: See TracChangeset for help on using the changeset viewer.