We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e23a1bb commit feb59abCopy full SHA for feb59ab
src/util/arith_tools.h
@@ -10,14 +10,13 @@ Author: Daniel Kroening, [email protected]
10
#ifndef CPROVER_UTIL_ARITH_TOOLS_H
11
#define CPROVER_UTIL_ARITH_TOOLS_H
12
13
+#include "invariant.h"
14
#include "mp_arith.h"
15
#include "optional.h"
-#include "invariant.h"
16
+#include "std_expr.h"
17
18
#include "deprecate.h"
19
-class exprt;
20
-class constant_exprt;
21
class typet;
22
23
// this one will go away
@@ -49,7 +48,7 @@ struct numeric_castt<mp_integer> final
49
48
optionalt<mp_integer> operator()(const exprt &expr) const
50
{
51
mp_integer out;
52
- if(to_integer(expr, out))
+ if(expr.id() != ID_constant || to_integer(to_constant_expr(expr), out))
53
return {};
54
return out;
55
}
0 commit comments