Ignore:
Timestamp:
Jun 23, 2017, 4:20:33 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
74e58ea3, 7bbba76
Parents:
e1c1829 (diff), 88177cf (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    re1c1829 r4c03e63  
    288288}
    289289
    290 // CastExpr *CastExpr::clone() const { return 0; }
    291 
    292290void CastExpr::print( std::ostream &os, int indent ) const {
    293291        os << "Cast of:" << std::endl << std::string( indent+2, ' ' );
     
    355353}
    356354
    357 //// is this right? It's cloning the member, but the member is a declaration so probably shouldn't be cloned...
    358355MemberExpr::MemberExpr( const MemberExpr &other ) :
    359356                Expression( other ), member( other.member ), aggregate( maybeClone( other.aggregate ) ) {
     
    361358
    362359MemberExpr::~MemberExpr() {
    363         // delete member;
     360        // don't delete the member declaration, since it points somewhere else in the tree
    364361        delete aggregate;
    365362}
     
    591588}
    592589
    593 UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {}
    594 
    595 UntypedValofExpr::~UntypedValofExpr() { delete body; }
    596 
    597 void UntypedValofExpr::print( std::ostream &os, int indent ) const {
    598         os << std::string( indent, ' ' ) << "Valof Expression: " << std::endl;
    599         if ( get_body() != 0 )
    600                 get_body()->print( os, indent + 2 );
    601 }
    602 
    603590RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {}
    604591RangeExpr::RangeExpr( const RangeExpr &other ) : Expression( other ), low( other.low->clone() ), high( other.high->clone() ) {}
Note: See TracChangeset for help on using the changeset viewer.