Changeset 65aca88
- Timestamp:
- May 12, 2017, 4:49:38 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:
- ce8c12f, fae2cf8
- Parents:
- edbdbe6
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/GenType.cc
redbdbe6 r65aca88 237 237 void GenType::visit( TupleType * tupleType ) { 238 238 assertf( ! genC, "Tuple types should not reach code generation." ); 239 Visitor::visit( tupleType );240 239 unsigned int i = 0; 241 240 std::ostringstream os; … … 245 244 os << genType( t, "", pretty, genC, lineMarks ) << (i == tupleType->size() ? "" : ", "); 246 245 } 247 os << "] ";246 os << "] "; 248 247 typeString = os.str() + typeString; 249 248 } -
src/InitTweak/FixInit.cc
redbdbe6 r65aca88 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.