Skip to content

Commit f840cd0

Browse files
authored
Merge pull request #7940 from diffblue/format_expr_natural
format_expr: format constants with natural number type
2 parents e0656e2 + fed843e commit f840cd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/format_expr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static std::ostream &format_rec(std::ostream &os, const constant_exprt &src)
187187
type == ID_unsignedbv || type == ID_signedbv || type == ID_c_bool ||
188188
type == ID_c_bit_field)
189189
return os << *numeric_cast<mp_integer>(src);
190-
else if(type == ID_integer)
190+
else if(type == ID_integer || type == ID_natural)
191191
return os << src.get_value();
192192
else if(type == ID_string)
193193
return os << '"' << escape(id2string(src.get_value())) << '"';

0 commit comments

Comments
 (0)