Changeset b7778c1 for src/InitTweak
- Timestamp:
- Oct 4, 2017, 3:31:43 PM (8 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:
- 3364962
- Parents:
- 3628765 (diff), bb9d8e8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/InitTweak/FixInit.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r3628765 rb7778c1 390 390 assert( env ); 391 391 CP_CTOR_PRINT( std::cerr << "Type Substitution: " << *env << std::endl; ) 392 assert( arg-> has_result());392 assert( arg->result ); 393 393 Type * result = arg->get_result(); 394 394 if ( skipCopyConstruct( result ) ) return; // skip certain non-copyable types … … 552 552 Expression * retExpr = new CommaExpr( assign, new VariableExpr( returnDecl ) ); 553 553 // move env from callExpr to retExpr 554 retExpr->set_env( callExpr->get_env() ); 555 callExpr->set_env( nullptr ); 554 std::swap( retExpr->env, callExpr->env ); 556 555 return retExpr; 557 556 } else { … … 811 810 GuardValue( labelVars ); 812 811 labelVars.clear(); 812 // LabelFinder does not recurse into FunctionDecl, so need to visit 813 // its children manually. 813 814 maybeAccept( funcDecl->type, finder ); 814 815 maybeAccept( funcDecl->statements, finder ); … … 1126 1127 static UniqueName tempNamer( "_tmp_ctor_expr" ); 1127 1128 // xxx - is the size check necessary? 1128 assert( ctorExpr-> has_result()&& ctorExpr->get_result()->size() == 1 );1129 assert( ctorExpr->result && ctorExpr->get_result()->size() == 1 ); 1129 1130 1130 1131 // xxx - ideally we would reuse the temporary generated from the copy constructor passes from within firstArg if it exists and not generate a temporary if it's unnecessary.
Note:
See TracChangeset
for help on using the changeset viewer.