Ignore:
Timestamp:
Sep 6, 2018, 10:51:37 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
9b086ca
Parents:
ec42ff2e
Message:

Add Destructor handlers for argument and return temporaries, merge and simplify ResolveCopyCtors/FixCopyCtors? passes, simplify ImplicitCopyCtorExpr?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    rec42ff2e r2f86ddf  
    538538        assert( callExpr );
    539539        assert( callExpr->result );
    540         set_result( callExpr->get_result()->clone() );
     540        set_result( callExpr->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 );
    547544}
    548545
     
    550547        set_env( nullptr ); // ImplicitCopyCtorExpr does not take ownership of an environment
    551548        delete callExpr;
    552         deleteAll( tempDecls );
    553         deleteAll( returnDecls );
    554         deleteAll( dtors );
    555549}
    556550
     
    558552        os <<  "Implicit Copy Constructor Expression: " << std::endl << indent+1;
    559553        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 );
    565554}
    566555
Note: See TracChangeset for help on using the changeset viewer.