cprover
|
#include <c_typecast.h>
Public Member Functions | |
c_typecastt (const namespacet &_ns) | |
virtual | ~c_typecastt () |
virtual void | implicit_typecast (exprt &expr, const typet &type) |
virtual void | implicit_typecast_arithmetic (exprt &expr) |
virtual void | implicit_typecast_arithmetic (exprt &expr1, exprt &expr2) |
Public Attributes | |
std::list< std::string > | errors |
std::list< std::string > | warnings |
Protected Types | |
enum | c_typet { BOOL, CHAR, UCHAR, SHORT, USHORT, INT, UINT, LONG, ULONG, LONGLONG, ULONGLONG, LARGE_SIGNED_INT, LARGE_UNSIGNED_INT, INTEGER, FIXEDBV, SINGLE, DOUBLE, LONGDOUBLE, FLOAT128, RATIONAL, REAL, COMPLEX, VOIDPTR, PTR, OTHER } |
Protected Member Functions | |
c_typet | get_c_type (const typet &type) const |
void | implicit_typecast_arithmetic (exprt &expr, c_typet c_type) |
typet | follow_with_qualifiers (const typet &src) |
virtual void | implicit_typecast_followed (exprt &expr, const typet &src_type, const typet &orig_dest_type, const typet &dest_type) |
void | do_typecast (exprt &dest, const typet &type) |
c_typet | minimum_promotion (const typet &type) const |
Protected Attributes | |
const namespacet & | ns |
Definition at line 41 of file c_typecast.h.
|
protected |
Definition at line 71 of file c_typecast.h.
|
inlineexplicit |
Definition at line 44 of file c_typecast.h.
|
inlinevirtual |
Definition at line 48 of file c_typecast.h.
Definition at line 702 of file c_typecast.cpp.
References index_exprt::array(), namespace_baset::follow(), from_integer(), irept::get(), irept::id(), index_exprt::index(), index_type(), is_not_zero(), exprt::make_typecast(), ns, typet::subtype(), and exprt::type().
Referenced by implicit_typecast_arithmetic(), and implicit_typecast_followed().
Definition at line 253 of file c_typecast.cpp.
References namespace_baset::follow(), irept::id(), ns, and c_qualifierst::write().
Referenced by implicit_typecast().
|
protected |
Definition at line 280 of file c_typecast.cpp.
References configt::ansi_c, BOOL, CHAR, configt::ansi_ct::char_width, COMPLEX, config, DOUBLE, configt::ansi_ct::double_width, FIXEDBV, FLOAT128, namespace_baset::follow(), irept::get_size_t(), irept::id(), INT, configt::ansi_ct::int_width, LARGE_SIGNED_INT, LARGE_UNSIGNED_INT, LONG, configt::ansi_ct::long_double_width, configt::ansi_ct::long_int_width, configt::ansi_ct::long_long_int_width, LONGDOUBLE, LONGLONG, ns, OTHER, PTR, RATIONAL, REAL, SHORT, configt::ansi_ct::short_int_width, SINGLE, configt::ansi_ct::single_width, typet::subtype(), to_c_bit_field_type(), UCHAR, UINT, ULONG, ULONGLONG, USHORT, and VOIDPTR.
Referenced by implicit_typecast_arithmetic(), and minimum_promotion().
Reimplemented in cpp_typecastt.
Definition at line 448 of file c_typecast.cpp.
References follow_with_qualifiers(), implicit_typecast_followed(), exprt::type(), and c_qualifierst::write().
Referenced by c_implicit_typecast(), check_c_implicit_typecast(), and c_typecheck_baset::implicit_typecast().
|
virtual |
Reimplemented in cpp_typecastt.
Definition at line 442 of file c_typecast.cpp.
References minimum_promotion(), and exprt::type().
Referenced by c_implicit_typecast_arithmetic(), implicit_typecast_arithmetic(), and c_typecheck_baset::implicit_typecast_arithmetic().
Reimplemented in cpp_typecastt.
Definition at line 588 of file c_typecast.cpp.
References COMPLEX, do_typecast(), DOUBLE, FIXEDBV, FLOAT128, namespace_baset::follow(), get_c_type(), irept::get_size_t(), bitvector_typet::get_width(), implicit_typecast_arithmetic(), LARGE_SIGNED_INT, LARGE_UNSIGNED_INT, LONGDOUBLE, minimum_promotion(), ns, PTR, SINGLE, typet::subtype(), to_fixedbv_type(), exprt::type(), and VOIDPTR.
Definition at line 365 of file c_typecast.cpp.
References BOOL, CHAR, COMPLEX, do_typecast(), DOUBLE, double_type(), FLOAT128, float_type(), namespace_baset::follow(), irept::id(), INT, INTEGER, LONG, long_double_type(), LONGDOUBLE, LONGLONG, ns, pointer_type(), PTR, ieee_float_spect::quadruple_precision(), RATIONAL, REAL, SHORT, signed_int_type(), signed_long_int_type(), signed_long_long_int_type(), SINGLE, typet::subtype(), ieee_float_spect::to_type(), exprt::type(), UCHAR, UINT, ULONG, ULONGLONG, UNREACHABLE, unsigned_int_type(), unsigned_long_int_type(), unsigned_long_long_int_type(), and USHORT.
|
protectedvirtual |
Definition at line 462 of file c_typecast.cpp.
References base_type_eq(), check_c_implicit_typecast(), do_typecast(), errors, namespace_baset::follow(), irept::full_eq(), irept::get_bool(), irept::id(), is_number(), is_void_pointer(), exprt::is_zero(), ns, irept::remove(), irept::set(), simplify_expr(), typet::subtype(), to_union_type(), exprt::type(), and warnings.
Referenced by implicit_typecast().
|
protected |
Definition at line 410 of file c_typecast.cpp.
References configt::ansi_c, configt::ansi_ct::char_width, config, get_c_type(), bitvector_typet::get_width(), irept::id(), INT, configt::ansi_ct::int_width, configt::ansi_ct::short_int_width, to_c_bit_field_type(), UCHAR, UINT, and USHORT.
Referenced by implicit_typecast_arithmetic().
std::list<std::string> c_typecastt::errors |
Definition at line 63 of file c_typecast.h.
Referenced by c_implicit_typecast(), c_implicit_typecast_arithmetic(), check_c_implicit_typecast(), c_typecheck_baset::implicit_typecast(), and implicit_typecast_followed().
|
protected |
Definition at line 67 of file c_typecast.h.
Referenced by do_typecast(), follow_with_qualifiers(), get_c_type(), implicit_typecast_arithmetic(), and implicit_typecast_followed().
std::list<std::string> c_typecastt::warnings |
Definition at line 64 of file c_typecast.h.
Referenced by c_typecheck_baset::implicit_typecast(), and implicit_typecast_followed().