Ignore:
Timestamp:
Feb 28, 2018, 4:48:22 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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
Message:

Changed warning system to prepare for toggling warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r6a8df56 ra16764a6  
    240240                                std::cerr << "No reasonable alternatives for expression " << expr << std::endl;
    241241                        )
    242                         throw SemanticError( expr, "No reasonable alternatives for expression " );
     242                        SemanticError( expr, "No reasonable alternatives for expression " );
    243243                }
    244244                if ( prune ) {
     
    258258                                stream << " Alternatives are:\n";
    259259                                printAlts( winners, stream, 1 );
    260                                 throw SemanticError( expr->location, stream.str() );
     260                                SemanticError( expr->location, stream.str() );
    261261                        }
    262262                        alternatives = move(pruned);
     
    495495                                return;
    496496                        } else if ( level >= recursionLimit ) {
    497                                 throw SemanticError( newAlt.expr->location, "Too many recursive assertions" );
     497                                SemanticError( newAlt.expr->location, "Too many recursive assertions" );
    498498                        } else {
    499499                                AssertionSet newerNeed;
     
    11121112
    11131113                AltList candidates;
    1114                 SemanticError errors;
     1114                SemanticErrorException errors;
    11151115                for ( AltList::iterator func = funcFinder.alternatives.begin(); func != funcFinder.alternatives.end(); ++func ) {
    11161116                        try {
     
    11381138                                        } // if
    11391139                                }
    1140                         } catch ( SemanticError &e ) {
     1140                        } catch ( SemanticErrorException &e ) {
    11411141                                errors.append( e );
    11421142                        }
     
    11671167                                                }
    11681168                                        }
    1169                                 } catch ( SemanticError &e ) {
     1169                                } catch ( SemanticErrorException &e ) {
    11701170                                        errors.append( e );
    11711171                                }
     
    14091409                        findMinCost( finder.alternatives.begin(), finder.alternatives.end(), back_inserter( winners ) );
    14101410                        if ( winners.size() != 1 ) {
    1411                                 throw SemanticError( sizeofExpr->get_expr(), "Ambiguous expression in sizeof operand: " );
     1411                                SemanticError( sizeofExpr->get_expr(), "Ambiguous expression in sizeof operand: " );
    14121412                        } // if
    14131413                        // return the lowest cost alternative for the argument
     
    14301430                        findMinCost( finder.alternatives.begin(), finder.alternatives.end(), back_inserter( winners ) );
    14311431                        if ( winners.size() != 1 ) {
    1432                                 throw SemanticError( alignofExpr->get_expr(), "Ambiguous expression in alignof operand: " );
     1432                                SemanticError( alignofExpr->get_expr(), "Ambiguous expression in alignof operand: " );
    14331433                        } // if
    14341434                        // return the lowest cost alternative for the argument
Note: See TracChangeset for help on using the changeset viewer.