Changes in src/InitTweak/FixInit.cc [5fe35d6:ddae809]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r5fe35d6 rddae809 943 943 } 944 944 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 945 958 void GenStructMemberCalls::previsit( FunctionDecl * funcDecl ) { 946 959 GuardValue( function ); … … 999 1012 // need to explicitly re-add function parameters to the indexer in order to resolve copy constructors 1000 1013 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 ); 1002 1017 1003 1018 // need to iterate through members in reverse in order for … … 1014 1029 // insert and resolve default/copy constructor call for each field that's unhandled 1015 1030 std::list< Statement * > stmt; 1016 Expression * arg2 = nullptr;1031 Expression * arg2 = 0; 1017 1032 if ( isCopyConstructor( function ) ) { 1018 1033 // if copy ctor, need to pass second-param-of-this-function.field
Note: See TracChangeset
for help on using the changeset viewer.