Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r0e315a5 r5170d95  
    538538        assert( callExpr );
    539539        assert( callExpr->result );
    540         set_result( callExpr->result->clone() );
     540        set_result( callExpr->get_result()->clone() );
    541541}
    542542
    543543ImplicitCopyCtorExpr::ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other ) : Expression( other ), callExpr( maybeClone( other.callExpr ) ) {
     544        cloneAll( other.tempDecls, tempDecls );
     545        cloneAll( other.returnDecls, returnDecls );
     546        cloneAll( other.dtors, dtors );
    544547}
    545548
     
    547550        set_env( nullptr ); // ImplicitCopyCtorExpr does not take ownership of an environment
    548551        delete callExpr;
     552        deleteAll( tempDecls );
     553        deleteAll( returnDecls );
     554        deleteAll( dtors );
    549555}
    550556
     
    552558        os <<  "Implicit Copy Constructor Expression: " << std::endl << indent+1;
    553559        callExpr->print( os, indent+1 );
     560        os << std::endl << indent << "... with temporaries:" << std::endl;
     561        printAll( tempDecls, os, indent+1 );
     562        os << std::endl << indent << "... with return temporaries:" << std::endl;
     563        printAll( returnDecls, os, indent+1 );
     564        Expression::print( os, indent );
    554565}
    555566
     
    610621        computeResult();
    611622}
    612 StmtExpr::StmtExpr( const StmtExpr & other ) : Expression( other ), statements( other.statements->clone() ), resultExpr( other.resultExpr ) {
     623StmtExpr::StmtExpr( const StmtExpr & other ) : Expression( other ), statements( other.statements->clone() ) {
    613624        cloneAll( other.returnDecls, returnDecls );
    614625        cloneAll( other.dtors, dtors );
Note: See TracChangeset for help on using the changeset viewer.