Changeset 9236060 for src/SynTree/Expression.cc
- Timestamp:
- Aug 14, 2017, 2:03:39 PM (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:
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
rfd344aa r9236060 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Mar 30 16:41:13201713 // Update Count : 5 212 // Last Modified On : Tue Jul 25 14:15:47 2017 13 // Update Count : 54 14 14 // 15 15 … … 305 305 if ( result->isVoid() ) { 306 306 os << "nothing"; 307 } else { 308 result->print( os, indent+2 ); 309 } // if 310 os << std::endl; 311 Expression::print( os, indent ); 312 } 313 314 VirtualCastExpr::VirtualCastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) { 315 set_result(toType); 316 } 317 318 VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) { 319 } 320 321 VirtualCastExpr::~VirtualCastExpr() { 322 delete arg; 323 } 324 325 void 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"; 307 332 } else { 308 333 result->print( os, indent+2 );
Note: See TracChangeset
for help on using the changeset viewer.