Changeset d5556a3 for src/SynTree/Expression.cc
- Timestamp:
- Dec 13, 2016, 5:37:15 PM (9 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:
- 31f379c
- Parents:
- 1d2b64f
- File:
-
- 1 edited
-
src/SynTree/Expression.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r1d2b64f rd5556a3 524 524 525 525 ImplicitCopyCtorExpr::~ImplicitCopyCtorExpr() { 526 set_env( nullptr ); // ImplicitCopyCtorExpr does not take ownership of an environment 526 527 delete callExpr; 527 528 deleteAll( tempDecls ); … … 533 534 os << "Implicit Copy Constructor Expression: " << std::endl; 534 535 assert( callExpr ); 536 os << std::string( indent+2, ' ' ); 535 537 callExpr->print( os, indent + 2 ); 536 538 os << std::endl << std::string( indent, ' ' ) << "with temporaries:" << std::endl; … … 584 586 os << std::string( indent+2, ' ' ); 585 587 initializer->print( os, indent + 2 ); 588 Expression::print( os, indent ); 586 589 } 587 590 … … 603 606 os << " ... "; 604 607 high->print( os, indent ); 608 Expression::print( os, indent ); 605 609 } 606 610 … … 614 618 } 615 619 } 616 StmtExpr::StmtExpr( const StmtExpr &other ) : Expression( other ), statements( other.statements->clone() ) {} 620 StmtExpr::StmtExpr( const StmtExpr &other ) : Expression( other ), statements( other.statements->clone() ) { 621 cloneAll( other.returnDecls, returnDecls ); 622 cloneAll( other.dtors, dtors ); 623 } 617 624 StmtExpr::~StmtExpr() { 618 625 delete statements; 626 deleteAll( dtors ); 627 deleteAll( returnDecls ); 619 628 } 620 629 void StmtExpr::print( std::ostream &os, int indent ) const { 621 630 os << "Statement Expression: " << std::endl << std::string( indent, ' ' ); 622 631 statements->print( os, indent+2 ); 632 if ( ! returnDecls.empty() ) { 633 os << std::string( indent+2, ' ' ) << "with returnDecls: "; 634 printAll( returnDecls, os, indent+2 ); 635 } 636 if ( ! dtors.empty() ) { 637 os << std::string( indent+2, ' ' ) << "with dtors: "; 638 printAll( dtors, os, indent+2 ); 639 } 640 Expression::print( os, indent ); 623 641 } 624 642 … … 644 662 get_expr()->print( os, indent+2 ); 645 663 if ( get_object() ) { 646 os << "with decl: ";664 os << std::string( indent+2, ' ' ) << "with decl: "; 647 665 get_object()->printShort( os, indent+2 ); 648 666 } 667 Expression::print( os, indent ); 649 668 } 650 669
Note:
See TracChangeset
for help on using the changeset viewer.