Changeset 18ca28e for src/InitTweak
- Timestamp:
- Oct 19, 2017, 11:15:19 AM (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:
- d411426d
- Parents:
- 0a267c1
- git-author:
- Rob Schluntz <rschlunt@…> (10/13/17 13:49:10)
- git-committer:
- Rob Schluntz <rschlunt@…> (10/19/17 11:15:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/GenInit.cc
r0a267c1 r18ca28e 128 128 if ( returnStmt->expr && returnVals.size() == 1 && isConstructable( returnVals.front()->get_type() ) ) { 129 129 // explicitly construct the return value using the return expression and the retVal object 130 assertf( returnVals.front()-> get_name()!= "", "Function %s has unnamed return value\n", funcName.c_str() );130 assertf( returnVals.front()->name != "", "Function %s has unnamed return value\n", funcName.c_str() ); 131 131 132 132 ObjectDecl * retVal = strict_dynamic_cast< ObjectDecl * >( returnVals.front() ); … … 138 138 139 139 // return the retVal object 140 returnStmt-> set_expr( new VariableExpr( returnVals.front()) );140 returnStmt->expr = new VariableExpr( returnVals.front() ); 141 141 } // if 142 142 }
Note: See TracChangeset
for help on using the changeset viewer.