Changeset 182fe1e for src/ControlStruct
- Timestamp:
- Aug 1, 2016, 9:07:35 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 79f64f1
- Parents:
- c45170a (diff), 08061589 (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/ControlStruct/CaseRangeMutator.cc
rc45170a r182fe1e 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sun Jul 31 00:14:16201613 // Update Count : 2911 // Last Modified By : 12 // Last Modified On : Sun Jul 31 12:16:28 2016 13 // Update Count : 32 14 14 // 15 15 … … 37 37 38 38 if ( ! newCaseLabels.empty() ) { 39 std::cout << "FRED" << std::endl; 39 40 std::list< Statement * > newCases; 40 41 … … 64 65 65 66 return switchStmt; 66 } 67 } // CaseRangeMutator::mutate 67 68 68 69 Statement *CaseRangeMutator::mutate( CaseStmt *caseStmt ) { 69 if ( TupleExpr *tcond = dynamic_cast< TupleExpr * >( caseStmt->get_condition() ) ) { // case list 70 // case list, e.g., case 1, 3, 5: 71 if ( TupleExpr *tcond = dynamic_cast< TupleExpr * >( caseStmt->get_condition() ) ) { 70 72 assert( ! tcond->get_exprs().empty() ); 71 for ( std::list< Expression * >::iterator i = tcond->get_exprs().begin(); i != tcond->get_exprs().end(); i++ ) 73 for ( std::list< Expression * >::iterator i = tcond->get_exprs().begin(); i != tcond->get_exprs().end(); i++ ) { 72 74 newCaseLabels.push_back( *i ); // do I need to clone them? 75 } // for 73 76 } // if 74 77 … … 77 80 78 81 return caseStmt; 79 } 82 } // CaseRangeMutator::mutate 80 83 } // namespace ControlStruct 81 84
Note: See TracChangeset
for help on using the changeset viewer.