Ignore:
Timestamp:
Jul 27, 2017, 2:56:39 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:
874960b
Parents:
4d4e5de (diff), a04ce4d (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

    r4d4e5de rfcd17b2f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 16:41:13 2017
    13 // Update Count     : 52
     12// Last Modified On : Tue Jul 25 14:15:47 2017
     13// Update Count     : 54
    1414//
    1515
     
    298298        if ( result->isVoid() ) {
    299299                os << "nothing";
     300        } else {
     301                result->print( os, indent+2 );
     302        } // if
     303        os << std::endl;
     304        Expression::print( os, indent );
     305}
     306
     307VirtualCastExpr::VirtualCastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) {
     308        set_result(toType);
     309}
     310
     311VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) {
     312}
     313
     314VirtualCastExpr::~VirtualCastExpr() {
     315        delete arg;
     316}
     317
     318void VirtualCastExpr::print( std::ostream &os, int indent ) const {
     319        os << "Virtual Cast of:" << std::endl << std::string( indent+2, ' ' );
     320        arg->print(os, indent+2);
     321        os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl;
     322        os << std::string( indent+2, ' ' );
     323        if ( ! result ) {
     324                os << "unknown";
    300325        } else {
    301326                result->print( os, indent+2 );
Note: See TracChangeset for help on using the changeset viewer.