Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    rddae809 r5fe35d6  
    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 
    958945                void GenStructMemberCalls::previsit( FunctionDecl * funcDecl ) {
    959946                        GuardValue( function );
     
    1012999                                // need to explicitly re-add function parameters to the indexer in order to resolve copy constructors
    10131000                                auto guard = makeFuncGuard( [this]() { indexer.enterScope(); }, [this]() { indexer.leaveScope(); } );
    1014                                 addTypes( indexer, function->type->forall );
    1015                                 addIds( indexer, function->type->returnVals );
    1016                                 addIds( indexer, function->type->parameters );
     1001                                indexer.addFunctionType( function->type );
    10171002
    10181003                                // need to iterate through members in reverse in order for
     
    10291014                                        // insert and resolve default/copy constructor call for each field that's unhandled
    10301015                                        std::list< Statement * > stmt;
    1031                                         Expression * arg2 = 0;
     1016                                        Expression * arg2 = nullptr;
    10321017                                        if ( isCopyConstructor( function ) ) {
    10331018                                                // if copy ctor, need to pass second-param-of-this-function.field
Note: See TracChangeset for help on using the changeset viewer.