Ignore:
Timestamp:
Aug 14, 2017, 2:03:39 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
74b007ba
Parents:
fd344aa (diff), 54cd58b (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' into references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    rfd344aa r9236060  
    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
     
    305305        if ( result->isVoid() ) {
    306306                os << "nothing";
     307        } else {
     308                result->print( os, indent+2 );
     309        } // if
     310        os << std::endl;
     311        Expression::print( os, indent );
     312}
     313
     314VirtualCastExpr::VirtualCastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) {
     315        set_result(toType);
     316}
     317
     318VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) {
     319}
     320
     321VirtualCastExpr::~VirtualCastExpr() {
     322        delete arg;
     323}
     324
     325void VirtualCastExpr::print( std::ostream &os, int indent ) const {
     326        os << "Virtual Cast of:" << std::endl << std::string( indent+2, ' ' );
     327        arg->print(os, indent+2);
     328        os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl;
     329        os << std::string( indent+2, ' ' );
     330        if ( ! result ) {
     331                os << "unknown";
    307332        } else {
    308333                result->print( os, indent+2 );
Note: See TracChangeset for help on using the changeset viewer.