Ignore:
Timestamp:
Sep 5, 2016, 9:49:53 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
621701d
Parents:
b16898e
Message:

add error checking for managed object's initializer depth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/PolyMutator.cc

    rb16898e rdcd73d1  
    3030
    3131        void PolyMutator::mutateStatementList( std::list< Statement* > &statements ) {
     32                SemanticError errors;
     33
    3234                for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
    3335                        if ( ! stmtsToAddAfter.empty() ) {
    3436                                statements.splice( i, stmtsToAddAfter );
    3537                        } // if
    36                         *i = (*i)->acceptMutator( *this );
     38                        try {
     39                                *i = (*i)->acceptMutator( *this );
     40                        } catch ( SemanticError &e ) {
     41                                errors.append( e );
     42                        } // try
    3743                        if ( ! stmtsToAdd.empty() ) {
    3844                                statements.splice( i, stmtsToAdd );
     
    4248                        statements.splice( statements.end(), stmtsToAddAfter );
    4349                } // if
     50                if ( ! errors.isEmpty() ) {
     51                        throw errors;
     52                }
    4453        }
    4554
Note: See TracChangeset for help on using the changeset viewer.