File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Date: November 2011
16
16
17
17
#include < goto-programs/goto_model.h>
18
18
19
+ #include < goto-programs/remove_skip.h>
19
20
#include < linking/static_lifetime_init.h>
20
21
21
22
void nondet_static (
@@ -58,11 +59,12 @@ void nondet_static(
58
59
if (is_constant_or_has_constant_components (sym.type (), ns))
59
60
continue ;
60
61
61
- i_it=init.insert_before (++i_it);
62
- i_it->make_assignment ();
63
- i_it->code =code_assignt (sym, side_effect_expr_nondett (sym.type ()));
64
- i_it->source_location =instruction.source_location ;
65
- i_it->function =instruction.function ;
62
+ const auto &ni_it = init.insert_before (++i_it);
63
+ ni_it->make_assignment ();
64
+ ni_it->code = code_assignt (sym, side_effect_expr_nondett (sym.type ()));
65
+ ni_it->source_location = instruction.source_location ;
66
+ ni_it->function = instruction.function ;
67
+ i_it->make_skip ();
66
68
}
67
69
else if (instruction.is_function_call ())
68
70
{
@@ -73,6 +75,7 @@ void nondet_static(
73
75
nondet_static (ns, goto_functions, fsym.get_identifier ());
74
76
}
75
77
}
78
+ remove_skip (init);
76
79
}
77
80
78
81
void nondet_static (
You can’t perform that action at this time.
0 commit comments