Skip to content

Commit d7dd40a

Browse files
committed
Simplifier type invariant: add diagnostic information
With the previous code, an invariant failure did not aid debugging.
1 parent 2a833ca commit d7dd40a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/simplify_expr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2975,7 +2975,8 @@ simplify_exprt::resultt<> simplify_exprt::simplify_rec(const exprt &expr)
29752975
}
29762976
else // change, new expression is 'tmp'
29772977
{
2978-
POSTCONDITION(as_const(tmp).type() == expr.type());
2978+
POSTCONDITION_WITH_DIAGNOSTICS(
2979+
as_const(tmp).type() == expr.type(), tmp.pretty(), expr.pretty());
29792980

29802981
#ifdef USE_CACHE
29812982
// save in cache

0 commit comments

Comments
 (0)