File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class goto_functiont
4646 type.set (ID_C_hide, true );
4747 }
4848
49- goto_functiont ()
49+ goto_functiont () : body(), type({}, empty_typet())
5050 {
5151 }
5252
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ class goto_modelt : public abstract_goto_modelt
9292
9393 bool can_produce_function (const irep_idt &id) const override
9494 {
95- return goto_functions.function_map .count (id);
95+ return goto_functions.function_map .find (id) !=
96+ goto_functions.function_map .end ();
9697 }
9798};
9899
@@ -127,7 +128,8 @@ class wrapper_goto_modelt : public abstract_goto_modelt
127128
128129 bool can_produce_function (const irep_idt &id) const override
129130 {
130- return goto_functions.function_map .count (id);
131+ return goto_functions.function_map .find (id) !=
132+ goto_functions.function_map .end ();
131133 }
132134
133135private:
Original file line number Diff line number Diff line change @@ -10,14 +10,13 @@ Author: Daniel Kroening, kroening@kroening.com
1010#ifndef CPROVER_UTIL_ARITH_TOOLS_H
1111#define CPROVER_UTIL_ARITH_TOOLS_H
1212
13+ #include " invariant.h"
1314#include " mp_arith.h"
1415#include " optional.h"
15- #include " invariant .h"
16+ #include " std_expr .h"
1617
1718#include " deprecate.h"
1819
19- class exprt ;
20- class constant_exprt ;
2120class typet ;
2221
2322// this one will go away
@@ -27,8 +26,6 @@ DEPRECATED("Use the constant_exprt version instead")
2726bool to_integer(const exprt &expr, mp_integer &int_value);
2827
2928// returns 'true' on error
30- // / \deprecated: use numeric_cast<mp_integer> instead
31- DEPRECATED (" Use numeric_cast<mp_integer> instead" )
3229bool to_integer (const constant_exprt &expr, mp_integer &int_value);
3330
3431// returns 'true' on error
@@ -49,7 +46,7 @@ struct numeric_castt<mp_integer> final
4946 optionalt<mp_integer> operator ()(const exprt &expr) const
5047 {
5148 mp_integer out;
52- if (to_integer (expr, out))
49+ if (expr. id () != ID_constant || to_integer (to_constant_expr ( expr) , out))
5350 return {};
5451 return out;
5552 }
You can’t perform that action at this time.
0 commit comments