File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
src/goto-instrument/contracts Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ Date: September 2021
1111#include " utils.h"
1212
1313#include < util/c_types.h>
14- #include < util/exception_utils.h>
1514#include < util/fresh_symbol.h>
1615#include < util/graph.h>
1716#include < util/mathematical_expr.h>
@@ -470,16 +469,13 @@ static void replace_history_parameter_rec(
470469
471470 const auto ¶meter = to_history_expr (expr, history_id).expression ();
472471 const auto &id = parameter.id ();
473- if (
474- id != ID_dereference && id != ID_member && id != ID_symbol &&
475- id != ID_ptrmember && id != ID_constant && id != ID_typecast &&
476- id != ID_index)
477- {
478- throw invalid_source_file_exceptiont (
479- " Tracking history of " + id2string (parameter.id ()) +
480- " expressions is not supported yet." ,
481- expr.source_location ());
482- }
472+ DATA_INVARIANT_WITH_DIAGNOSTICS (
473+ id == ID_dereference || id == ID_member || id == ID_symbol ||
474+ id == ID_ptrmember || id == ID_constant || id == ID_typecast ||
475+ id == ID_index,
476+ " Tracking history of " + id2string (id) +
477+ " expressions is not supported yet." ,
478+ parameter.pretty ());
483479
484480 // speculatively insert a dummy, which will be replaced below if the insert
485481 // actually happened
You can’t perform that action at this time.
0 commit comments