Changeset 5fe35d6 for src/InitTweak
- Timestamp:
- Nov 22, 2017, 4:52:09 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 83882e9
- Parents:
- 452747a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r452747a r5fe35d6 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 958 945 void GenStructMemberCalls::previsit( FunctionDecl * funcDecl ) { 959 946 GuardValue( function ); … … 1012 999 // need to explicitly re-add function parameters to the indexer in order to resolve copy constructors 1013 1000 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 ); 1017 1002 1018 1003 // need to iterate through members in reverse in order for … … 1029 1014 // insert and resolve default/copy constructor call for each field that's unhandled 1030 1015 std::list< Statement * > stmt; 1031 Expression * arg2 = 0;1016 Expression * arg2 = nullptr; 1032 1017 if ( isCopyConstructor( function ) ) { 1033 1018 // if copy ctor, need to pass second-param-of-this-function.field
Note: See TracChangeset
for help on using the changeset viewer.