Changeset a16764a6 for src/ResolvExpr/AlternativeFinder.cc
- 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/ResolvExpr/AlternativeFinder.cc
r6a8df56 ra16764a6 240 240 std::cerr << "No reasonable alternatives for expression " << expr << std::endl; 241 241 ) 242 throwSemanticError( expr, "No reasonable alternatives for expression " );242 SemanticError( expr, "No reasonable alternatives for expression " ); 243 243 } 244 244 if ( prune ) { … … 258 258 stream << " Alternatives are:\n"; 259 259 printAlts( winners, stream, 1 ); 260 throwSemanticError( expr->location, stream.str() );260 SemanticError( expr->location, stream.str() ); 261 261 } 262 262 alternatives = move(pruned); … … 495 495 return; 496 496 } else if ( level >= recursionLimit ) { 497 throwSemanticError( newAlt.expr->location, "Too many recursive assertions" );497 SemanticError( newAlt.expr->location, "Too many recursive assertions" ); 498 498 } else { 499 499 AssertionSet newerNeed; … … 1112 1112 1113 1113 AltList candidates; 1114 SemanticError errors;1114 SemanticErrorException errors; 1115 1115 for ( AltList::iterator func = funcFinder.alternatives.begin(); func != funcFinder.alternatives.end(); ++func ) { 1116 1116 try { … … 1138 1138 } // if 1139 1139 } 1140 } catch ( SemanticError &e ) {1140 } catch ( SemanticErrorException &e ) { 1141 1141 errors.append( e ); 1142 1142 } … … 1167 1167 } 1168 1168 } 1169 } catch ( SemanticError &e ) {1169 } catch ( SemanticErrorException &e ) { 1170 1170 errors.append( e ); 1171 1171 } … … 1409 1409 findMinCost( finder.alternatives.begin(), finder.alternatives.end(), back_inserter( winners ) ); 1410 1410 if ( winners.size() != 1 ) { 1411 throwSemanticError( sizeofExpr->get_expr(), "Ambiguous expression in sizeof operand: " );1411 SemanticError( sizeofExpr->get_expr(), "Ambiguous expression in sizeof operand: " ); 1412 1412 } // if 1413 1413 // return the lowest cost alternative for the argument … … 1430 1430 findMinCost( finder.alternatives.begin(), finder.alternatives.end(), back_inserter( winners ) ); 1431 1431 if ( winners.size() != 1 ) { 1432 throwSemanticError( alignofExpr->get_expr(), "Ambiguous expression in alignof operand: " );1432 SemanticError( alignofExpr->get_expr(), "Ambiguous expression in alignof operand: " ); 1433 1433 } // if 1434 1434 // return the lowest cost alternative for the argument
Note: See TracChangeset
for help on using the changeset viewer.