File tree 3 files changed +8
-9
lines changed
3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class goto_functiont
46
46
type.set (ID_C_hide, true );
47
47
}
48
48
49
- goto_functiont ()
49
+ goto_functiont () : body(), type({}, empty_typet())
50
50
{
51
51
}
52
52
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ class goto_modelt : public abstract_goto_modelt
92
92
93
93
bool can_produce_function (const irep_idt &id) const override
94
94
{
95
- return goto_functions.function_map .count (id);
95
+ return goto_functions.function_map .find (id) !=
96
+ goto_functions.function_map .end ();
96
97
}
97
98
};
98
99
@@ -127,7 +128,8 @@ class wrapper_goto_modelt : public abstract_goto_modelt
127
128
128
129
bool can_produce_function (const irep_idt &id) const override
129
130
{
130
- return goto_functions.function_map .count (id);
131
+ return goto_functions.function_map .find (id) !=
132
+ goto_functions.function_map .end ();
131
133
}
132
134
133
135
private:
Original file line number Diff line number Diff line change 10
10
#ifndef CPROVER_UTIL_ARITH_TOOLS_H
11
11
#define CPROVER_UTIL_ARITH_TOOLS_H
12
12
13
+ #include " invariant.h"
13
14
#include " mp_arith.h"
14
15
#include " optional.h"
15
- #include " invariant .h"
16
+ #include " std_expr .h"
16
17
17
18
#include " deprecate.h"
18
19
19
- class exprt ;
20
- class constant_exprt ;
21
20
class typet ;
22
21
23
22
// this one will go away
@@ -27,8 +26,6 @@ DEPRECATED("Use the constant_exprt version instead")
27
26
bool to_integer(const exprt &expr, mp_integer &int_value);
28
27
29
28
// returns 'true' on error
30
- // / \deprecated: use numeric_cast<mp_integer> instead
31
- DEPRECATED (" Use numeric_cast<mp_integer> instead" )
32
29
bool to_integer (const constant_exprt &expr, mp_integer &int_value);
33
30
34
31
// returns 'true' on error
@@ -49,7 +46,7 @@ struct numeric_castt<mp_integer> final
49
46
optionalt<mp_integer> operator ()(const exprt &expr) const
50
47
{
51
48
mp_integer out;
52
- if (to_integer (expr, out))
49
+ if (expr. id () != ID_constant || to_integer (to_constant_expr ( expr) , out))
53
50
return {};
54
51
return out;
55
52
}
You can’t perform that action at this time.
0 commit comments