Changeset b1e63ac5 for src/SynTree/Visitor.cc
- Timestamp:
- Jul 4, 2017, 9:40:16 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:
- 208e5be
- Parents:
- 9c951e3 (diff), f7cb0bc (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/Visitor.cc
r9c951e3 rb1e63ac5 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Mar 30 16:45:25201713 // Update Count : 2 411 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu Jun 22 13:41:00 2017 13 // Update Count : 26 14 14 // 15 15 … … 67 67 void Visitor::visit( TypeDecl *typeDecl ) { 68 68 handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) ); 69 maybeAccept( typeDecl->get_init(), *this ); 69 70 } 70 71 … … 121 122 } 122 123 123 void Visitor::visit( BranchStmt *branchStmt ) {124 void Visitor::visit( __attribute__((unused)) BranchStmt *branchStmt ) { 124 125 } 125 126 126 127 void Visitor::visit( ReturnStmt *returnStmt ) { 127 128 maybeAccept( returnStmt->get_expr(), *this ); 129 } 130 131 void Visitor::visit( ThrowStmt * throwStmt ) { 132 maybeAccept( throwStmt->get_expr(), *this ); 133 maybeAccept( throwStmt->get_target(), *this ); 128 134 } 129 135 … … 131 137 maybeAccept( tryStmt->get_block(), *this ); 132 138 acceptAll( tryStmt->get_catchers(), *this ); 139 maybeAccept( tryStmt->get_finally(), *this ); 133 140 } 134 141 135 142 void Visitor::visit( CatchStmt *catchStmt ) { 136 143 maybeAccept( catchStmt->get_decl(), *this ); 144 maybeAccept( catchStmt->get_cond(), *this ); 137 145 maybeAccept( catchStmt->get_body(), *this ); 138 146 } … … 142 150 } 143 151 144 void Visitor::visit( NullStmt *nullStmt ) {152 void Visitor::visit( __attribute__((unused)) NullStmt *nullStmt ) { 145 153 } 146 154 … … 295 303 } 296 304 297 void Visitor::visit( UntypedValofExpr *valofExpr ) {298 maybeAccept( valofExpr->get_result(), *this );299 maybeAccept( valofExpr->get_body(), *this );300 }301 302 305 void Visitor::visit( RangeExpr *rangeExpr ) { 303 306 maybeAccept( rangeExpr->get_low(), *this ); … … 318 321 maybeAccept( tupleExpr->get_result(), *this ); 319 322 maybeAccept( tupleExpr->get_tuple(), *this ); 320 }321 322 void Visitor::visit( MemberTupleExpr *tupleExpr ) {323 maybeAccept( tupleExpr->get_result(), *this );324 maybeAccept( tupleExpr->get_member(), *this );325 maybeAccept( tupleExpr->get_aggregate(), *this );326 323 } 327 324 … … 343 340 } 344 341 342 void Visitor::visit( UntypedInitExpr * initExpr ) { 343 maybeAccept( initExpr->get_result(), *this ); 344 maybeAccept( initExpr->get_expr(), *this ); 345 // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver. 346 } 347 348 void Visitor::visit( InitExpr * initExpr ) { 349 maybeAccept( initExpr->get_result(), *this ); 350 maybeAccept( initExpr->get_expr(), *this ); 351 maybeAccept( initExpr->get_designation(), *this ); 352 } 353 345 354 346 355 void Visitor::visit( VoidType *voidType ) { … … 404 413 acceptAll( tupleType->get_forall(), *this ); 405 414 acceptAll( tupleType->get_types(), *this ); 415 acceptAll( tupleType->get_members(), *this ); 406 416 } 407 417 … … 433 443 } 434 444 445 void Visitor::visit( Designation * designation ) { 446 acceptAll( designation->get_designators(), *this ); 447 } 435 448 436 449 void Visitor::visit( SingleInit *singleInit ) { … … 439 452 440 453 void Visitor::visit( ListInit *listInit ) { 441 acceptAll( listInit->get_designat ors(), *this );454 acceptAll( listInit->get_designations(), *this ); 442 455 acceptAll( listInit->get_initializers(), *this ); 443 456 } … … 450 463 451 464 452 void Visitor::visit( Subrange *subrange ) {}453 454 455 void Visitor::visit( Constant *constant ) {}465 void Visitor::visit( __attribute__((unused)) Subrange *subrange ) {} 466 467 468 void Visitor::visit( __attribute__((unused)) Constant *constant ) {} 456 469 // Local Variables: // 457 470 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.