Changeset b8524ca for src/Tuples/TupleAssignment.cc
- Timestamp:
- Jun 20, 2019, 6:50:42 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 9af00d23
- Parents:
- 234b1cb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/TupleAssignment.cc
r234b1cb rb8524ca 464 464 // resolve ctor/dtor for the new object 465 465 ast::ptr< ast::Init > ctorInit = ResolvExpr::resolveCtorInit( 466 InitTweak::genCtorInit( ret ), spotter.crntFinder.symtab );466 InitTweak::genCtorInit( location, ret ), spotter.crntFinder.symtab ); 467 467 // remove environments from subexpressions of stmtExpr 468 468 ast::Pass< EnvRemover > rm{ env }; … … 550 550 // is && and RHS is lvalue 551 551 auto lhsType = lhsCand->expr->result.strict_as< ast::ReferenceType >(); 552 rhsCand->expr = new ast::CastExpr{ 553 rhsCand->expr->location, rhsCand->expr, lhsType->base }; 552 rhsCand->expr = new ast::CastExpr{ rhsCand->expr, lhsType->base }; 554 553 ast::ptr< ast::ObjectDecl > lobj = newObject( lhsNamer, lhsCand->expr ); 555 554 ast::ptr< ast::ObjectDecl > robj = newObject( rhsNamer, rhsCand->expr ); … … 604 603 if ( ! lhsCand->expr.as< ast::CastExpr >() ) { 605 604 lhsCand->expr = new ast::CastExpr{ 606 lhsCand->expr->location, lhsCand->expr, 607 new ast::ReferenceType{ lhsCand->expr->result } }; 605 lhsCand->expr, new ast::ReferenceType{ lhsCand->expr->result } }; 608 606 } 609 607 … … 616 614 if ( ! cand->expr->result.as< ast::ReferenceType >() ) { 617 615 cand->expr = new ast::CastExpr{ 618 cand->expr->location, cand->expr, 619 new ast::ReferenceType{ cand->expr->result } }; 616 cand->expr, new ast::ReferenceType{ cand->expr->result } }; 620 617 } 621 618 }
Note: See TracChangeset
for help on using the changeset viewer.