Skip to content

Commit fc6f500

Browse files
authored
Merge pull request #3594 from tautschnig/format-beautify
format_{expr,type}: Beautify array and pointer output
2 parents 315d05f + 14d04e2 commit fc6f500

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jbmc/regression/jbmc/simplify-classid-of-interface/test_no_simplify_vccs.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Test.class
33
--function Test.main --no-simplify --unwind 10 --show-vcc
44
^EXIT=0$
55
^SIGNAL=0$
6-
"java::Impl1" = cast\(\{ \{ "java::Impl1"\}, 0\}, struct \{ struct \{ string @class_identifier \} @java.lang.Object \}\)\[email protected]\.@class_identifier
6+
"java::Impl1" = cast\(\{ \{ "java::Impl1" \}, 0 \}, struct \{ struct \{ string @class_identifier \} @java.lang.Object \}\)\[email protected]\.@class_identifier
77
--
88
^warning: ignoring
99
--

src/util/format_expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ std::ostream &format_rec(std::ostream &os, const exprt &expr)
294294
os << format(op);
295295
}
296296

297-
return os << '}';
297+
return os << " }";
298298
}
299299
else if(id == ID_if)
300300
{

src/util/format_type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ std::ostream &format_rec(std::ostream &os, const typet &type)
6060
const auto &id = type.id();
6161

6262
if(id == ID_pointer)
63-
return os << '*' << format(to_pointer_type(type).subtype());
63+
return os << format(to_pointer_type(type).subtype()) << '*';
6464
else if(id == ID_array)
6565
{
6666
const auto &t = to_array_type(type);

0 commit comments

Comments
 (0)