Changeset a16764a6 for src/Common/PassVisitor.impl.h
- Timestamp:
- Feb 28, 2018, 4:48:22 PM (6 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:
- 446ffa3
- Parents:
- 6a8df56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.impl.h
r6a8df56 ra16764a6 65 65 DeclList_t* beforeDecls = visitor.get_beforeDecls(); 66 66 DeclList_t* afterDecls = visitor.get_afterDecls(); 67 SemanticError errors;67 SemanticErrorException errors; 68 68 69 69 for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) { … … 76 76 // run visitor on declaration 77 77 maybeAccept_impl( *i, visitor ); 78 } catch( SemanticError &e ) {78 } catch( SemanticErrorException &e ) { 79 79 errors.append( e ); 80 80 } … … 92 92 DeclList_t* beforeDecls = mutator.get_beforeDecls(); 93 93 DeclList_t* afterDecls = mutator.get_afterDecls(); 94 SemanticError errors;94 SemanticErrorException errors; 95 95 96 96 for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) { … … 102 102 // run mutator on declaration 103 103 maybeMutate_impl( *i, mutator ); 104 } catch( SemanticError &e ) {104 } catch( SemanticErrorException &e ) { 105 105 errors.append( e ); 106 106 } … … 125 125 inline void maybeAccept_impl( Container & container, PassVisitor< pass_type > & visitor ) { 126 126 if ( ! visitor.get_visit_children() ) return; 127 SemanticError errors;127 SemanticErrorException errors; 128 128 for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) { 129 129 try { … … 131 131 (*i)->accept( visitor ); 132 132 } 133 } catch( SemanticError &e ) {133 } catch( SemanticErrorException &e ) { 134 134 errors.append( e ); 135 135 } … … 152 152 inline void maybeMutate_impl( Container & container, PassVisitor< pass_type > & mutator ) { 153 153 if ( ! mutator.get_visit_children() ) return; 154 SemanticError errors;154 SemanticErrorException errors; 155 155 for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) { 156 156 try { … … 159 159 assert( *i ); 160 160 } // if 161 } catch( SemanticError &e ) {161 } catch( SemanticErrorException &e ) { 162 162 errors.append( e ); 163 163 } // try … … 172 172 void PassVisitor< pass_type >::handleStatementList( std::list< Statement * > & statements, func_t func ) { 173 173 if ( ! get_visit_children() ) return; 174 SemanticError errors;174 SemanticErrorException errors; 175 175 176 176 // don't want statements from outer CompoundStmts to be added to this CompoundStmt … … 195 195 || ( empty( beforeDecls ) && empty( afterDecls )) ); 196 196 197 } catch ( SemanticError &e ) {197 } catch ( SemanticErrorException &e ) { 198 198 errors.append( e ); 199 199 }
Note: See TracChangeset
for help on using the changeset viewer.