Skip to content

Commit 5ad0480

Browse files
author
Owen Jones
committed
Add tag to synthetic type made for String.format()
Having this type without a tag made it very hard to identify, e.g. if we want to treat it differently from types which are not synthetic (i.e. which come directly from the source code). Compare with refined_string_typet, which has the tag CPROVER_PREFIX "refined_string_type".
1 parent 2be3344 commit 5ad0480

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jbmc/src/java_bytecode/java_string_library_preprocess.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,7 @@ code_blockt java_string_library_preprocesst::make_string_format_code(
14591459
// a string, an integer, a floating point, a character, a boolean,
14601460
// an object of which we take the hash code, or a date/time
14611461
struct_typet structured_type;
1462+
structured_type.set_tag(CPROVER_PREFIX "string_formatter_variant");
14621463
structured_type.components().emplace_back("string_expr", refined_string_type);
14631464
structured_type.components().emplace_back(ID_int, java_int_type());
14641465
structured_type.components().emplace_back(ID_float, java_float_type());

0 commit comments

Comments
 (0)