- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r624b722d rd55d7a6 252 252 std::cerr << "No reasonable alternatives for expression " << expr << std::endl; 253 253 ) 254 throw SemanticError( "No reasonable alternatives for expression ", expr);254 throw SemanticError( expr, "No reasonable alternatives for expression " ); 255 255 } 256 256 if ( prune ) { … … 270 270 stream << "Alternatives are:\n"; 271 271 printAlts( winners, stream, 1 ); 272 throw SemanticError( stream.str() );272 throw SemanticError( expr->location, stream.str() ); 273 273 } 274 274 alternatives = move(pruned); … … 507 507 return; 508 508 } else if ( level >= recursionLimit ) { 509 throw SemanticError( "Too many recursive assertions" );509 throw SemanticError( newAlt.expr->location, "Too many recursive assertions" ); 510 510 } else { 511 511 AssertionSet newerNeed; … … 1421 1421 findMinCost( finder.alternatives.begin(), finder.alternatives.end(), back_inserter( winners ) ); 1422 1422 if ( winners.size() != 1 ) { 1423 throw SemanticError( "Ambiguous expression in sizeof operand: ", sizeofExpr->get_expr());1423 throw SemanticError( sizeofExpr->get_expr(), "Ambiguous expression in sizeof operand: " ); 1424 1424 } // if 1425 1425 // return the lowest cost alternative for the argument … … 1442 1442 findMinCost( finder.alternatives.begin(), finder.alternatives.end(), back_inserter( winners ) ); 1443 1443 if ( winners.size() != 1 ) { 1444 throw SemanticError( "Ambiguous expression in alignof operand: ", alignofExpr->get_expr());1444 throw SemanticError( alignofExpr->get_expr(), "Ambiguous expression in alignof operand: " ); 1445 1445 } // if 1446 1446 // return the lowest cost alternative for the argument
Note:
See TracChangeset
for help on using the changeset viewer.