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 1b97d63Copy full SHA for 1b97d63
src/util/arith_tools.h
@@ -10,13 +10,13 @@ Author: Daniel Kroening, [email protected]
10
#ifndef CPROVER_UTIL_ARITH_TOOLS_H
11
#define CPROVER_UTIL_ARITH_TOOLS_H
12
13
+#include "expr.h"
14
+#include "invariant.h"
15
#include "mp_arith.h"
16
#include "optional.h"
-#include "invariant.h"
17
18
#include "deprecate.h"
19
-class exprt;
20
class constant_exprt;
21
class typet;
22
@@ -49,7 +49,7 @@ struct numeric_castt<mp_integer> final
49
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