File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Module: C++ Language Type Checking
16
16
#include < util/std_types.h>
17
17
#include < util/std_expr.h>
18
18
#include < util/simplify_expr.h>
19
+ #include < util/invariant.h>
19
20
20
21
#include < ansi-c/c_qualifiers.h>
21
22
#include < util/c_types.h>
@@ -46,7 +47,7 @@ bool cpp_typecheckt::standard_conversion_lvalue_to_rvalue(
46
47
const exprt &expr,
47
48
exprt &new_expr) const
48
49
{
49
- assert (expr.get_bool (ID_C_lvalue));
50
+ PRECONDITION (expr.get_bool (ID_C_lvalue));
50
51
51
52
if (expr.type ().id ()==ID_code ||
52
53
expr.type ().id ()==ID_incomplete_struct ||
@@ -71,7 +72,7 @@ bool cpp_typecheckt::standard_conversion_array_to_pointer(
71
72
const exprt &expr,
72
73
exprt &new_expr) const
73
74
{
74
- assert (expr.type ().id ()==ID_array);
75
+ PRECONDITION (expr.type ().id ()==ID_array);
75
76
76
77
index_exprt index (
77
78
expr,
@@ -1060,7 +1061,9 @@ bool cpp_typecheckt::user_defined_conversion_sequence(
1060
1061
1061
1062
new_expr.swap (ctor_expr);
1062
1063
1063
- assert (new_expr.get (ID_statement)==ID_temporary_object);
1064
+ INVARIANT (
1065
+ new_expr.get (ID_statement)==ID_temporary_object,
1066
+ " statement" );
1064
1067
1065
1068
if (to.get_bool (ID_C_constant))
1066
1069
new_expr.type ().set (ID_C_constant, true );
You can’t perform that action at this time.
0 commit comments