25 if(src.
type() == dest)
31 const std::string &_format,
32 const std::list<exprt> &_operands)
56 std::ostringstream stream;
70 std::string length_modifier;
106 length_modifier =
"hh";
111 length_modifier =
"h";
119 length_modifier =
"ll";
124 length_modifier =
"l";
130 length_modifier =
"ll";
137 length_modifier = ch;
143 length_modifier =
"z";
161 if(length_modifier ==
"L")
174 if(length_modifier ==
"L")
183 if(format_constant.precision == 0)
184 format_constant.precision = 1;
187 if(length_modifier ==
"L")
194 length_modifier =
'l';
202 auto pointer_constant =
203 expr_try_dynamic_cast<annotated_pointer_constant_exprt>(op))
206 auto address_of = expr_try_dynamic_cast<address_of_exprt>(
209 if(address_of->object().id() == ID_string_constant)
211 out << format_constant(address_of->object());
215 expr_try_dynamic_cast<index_exprt>(address_of->object()))
218 index_expr->index().is_zero() &&
219 index_expr->array().id() == ID_string_constant)
221 out << format_constant(index_expr->array());
234 typet conversion_type;
235 if(length_modifier ==
"hh")
237 else if(length_modifier ==
"h")
239 else if(length_modifier ==
"l")
241 else if(length_modifier ==
"ll")
243 else if(length_modifier ==
"j")
245 else if(length_modifier ==
"z")
247 else if(length_modifier ==
"t")
262 typet conversion_type;
263 if(length_modifier ==
"hh")
265 else if(length_modifier ==
"h")
267 else if(length_modifier ==
"l")
269 else if(length_modifier ==
"ll")
271 else if(length_modifier ==
"j")
273 else if(length_modifier ==
"z")
275 else if(length_modifier ==
"t")
284 length_modifier =
'l';
288 if(length_modifier ==
"l")
291 out << format_constant(
signedbv_typet signed_long_int_type()
signedbv_typet signed_char_type()
unsignedbv_typet unsigned_int_type()
unsignedbv_typet unsigned_long_long_int_type()
unsignedbv_typet unsigned_long_int_type()
signedbv_typet signed_int_type()
signedbv_typet pointer_diff_type()
unsignedbv_typet unsigned_char_type()
signedbv_typet signed_size_type()
signedbv_typet signed_long_long_int_type()
bitvector_typet wchar_t_type()
floatbv_typet long_double_type()
floatbv_typet double_type()
signedbv_typet signed_short_int_type()
unsignedbv_typet unsigned_short_int_type()
Base class for all expressions.
typet & type()
Return the type of the expression.
Semantic type conversion.
The type of an expression, extends irept.
const exprt & skip_typecast(const exprt &expr)
find the expression nested inside typecasts, if any
Deprecated expression utility functions.
API to expression classes for Pointers.
exprt simplify_expr(exprt src, const namespacet &ns)
API to expression classes.