Changeset 535adab for src/InitTweak
- Timestamp:
- May 19, 2017, 11:56:51 AM (9 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:
- 44264c5, d298e03
- Parents:
- 27caf8d (diff), 8905f56 (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) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r27caf8d r535adab 619 619 620 620 Expression * FixCopyCtors::mutate( StmtExpr * stmtExpr ) { 621 stmtExpr = safe_dynamic_cast< StmtExpr * >( Parent::mutate( stmtExpr ) ); 621 // function call temporaries should be placed at statement-level, rather than nested inside of a new statement expression, 622 // since temporaries can be shared across sub-expressions, e.g. 623 // [A, A] f(); 624 // g([A] x, [A] y); 625 // f(g()); 626 // f is executed once, so the return temporary is shared across the tuple constructors for x and y. 627 std::list< Statement * > & stmts = stmtExpr->get_statements()->get_kids(); 628 for ( Statement *& stmt : stmts ) { 629 stmt = stmt->acceptMutator( *this ); 630 } // for 631 // stmtExpr = safe_dynamic_cast< StmtExpr * >( Parent::mutate( stmtExpr ) ); 622 632 assert( stmtExpr->get_result() ); 623 633 Type * result = stmtExpr->get_result();
Note:
See TracChangeset
for help on using the changeset viewer.