File tree 1 file changed +7
-11
lines changed
src/goto-instrument/contracts
1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ Date: September 2021
11
11
#include " utils.h"
12
12
13
13
#include < util/c_types.h>
14
- #include < util/exception_utils.h>
15
14
#include < util/fresh_symbol.h>
16
15
#include < util/graph.h>
17
16
#include < util/mathematical_expr.h>
@@ -470,16 +469,13 @@ static void replace_history_parameter_rec(
470
469
471
470
const auto ¶meter = to_history_expr (expr, history_id).expression ();
472
471
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 ());
483
479
484
480
// speculatively insert a dummy, which will be replaced below if the insert
485
481
// actually happened
You can’t perform that action at this time.
0 commit comments