Changeset 1a18423 for src/SynTree/Expression.cc
- Timestamp:
- Jun 22, 2017, 9:43:02 AM (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:
- 7d9c987
- Parents:
- 405c592 (diff), e9a3b20b (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r405c592 r1a18423 288 288 } 289 289 290 // CastExpr *CastExpr::clone() const { return 0; }291 292 290 void CastExpr::print( std::ostream &os, int indent ) const { 293 291 os << "Cast of:" << std::endl << std::string( indent+2, ' ' ); … … 355 353 } 356 354 357 //// is this right? It's cloning the member, but the member is a declaration so probably shouldn't be cloned...358 355 MemberExpr::MemberExpr( const MemberExpr &other ) : 359 356 Expression( other ), member( other.member ), aggregate( maybeClone( other.aggregate ) ) { … … 361 358 362 359 MemberExpr::~MemberExpr() { 363 // d elete member;360 // don't delete the member declaration, since it points somewhere else in the tree 364 361 delete aggregate; 365 362 } … … 591 588 } 592 589 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 603 590 RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {} 604 591 RangeExpr::RangeExpr( const RangeExpr &other ) : Expression( other ), low( other.low->clone() ), high( other.high->clone() ) {}
Note: See TracChangeset
for help on using the changeset viewer.