CBMC
c_typecastt Class Reference

#include <c_typecast.h>

+ Inheritance diagram for c_typecastt:
+ Collaboration diagram for c_typecastt:

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)
 

Static Public Member Functions

static std::optional< std::string > check_address_can_be_taken (const typet &)
 

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 namespacetns
 

Detailed Description

Definition at line 44 of file c_typecast.h.

Member Enumeration Documentation

◆ c_typet

enum c_typecastt::c_typet
protected
Enumerator
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 

Definition at line 78 of file c_typecast.h.

Constructor & Destructor Documentation

◆ c_typecastt()

c_typecastt::c_typecastt ( const namespacet _ns)
inlineexplicit

Definition at line 47 of file c_typecast.h.

◆ ~c_typecastt()

virtual c_typecastt::~c_typecastt ( )
inlinevirtual

Definition at line 51 of file c_typecast.h.

Member Function Documentation

◆ check_address_can_be_taken()

std::optional< std::string > c_typecastt::check_address_can_be_taken ( const typet type)
static
Returns
empty when address can be taken, error message otherwise

Definition at line 787 of file c_typecast.cpp.

◆ do_typecast()

void c_typecastt::do_typecast ( exprt dest,
const typet type 
)
protected

Definition at line 741 of file c_typecast.cpp.

◆ follow_with_qualifiers()

typet c_typecastt::follow_with_qualifiers ( const typet src)
protected

Definition at line 278 of file c_typecast.cpp.

◆ get_c_type()

c_typecastt::c_typet c_typecastt::get_c_type ( const typet type) const
protected

Definition at line 312 of file c_typecast.cpp.

◆ implicit_typecast()

void c_typecastt::implicit_typecast ( exprt expr,
const typet type 
)
virtual

Reimplemented in cpp_typecastt.

Definition at line 508 of file c_typecast.cpp.

◆ implicit_typecast_arithmetic() [1/3]

void c_typecastt::implicit_typecast_arithmetic ( exprt expr)
virtual

Reimplemented in cpp_typecastt.

Definition at line 502 of file c_typecast.cpp.

◆ implicit_typecast_arithmetic() [2/3]

void c_typecastt::implicit_typecast_arithmetic ( exprt expr,
c_typet  c_type 
)
protected

Definition at line 422 of file c_typecast.cpp.

◆ implicit_typecast_arithmetic() [3/3]

void c_typecastt::implicit_typecast_arithmetic ( exprt expr1,
exprt expr2 
)
virtual

Reimplemented in cpp_typecastt.

Definition at line 647 of file c_typecast.cpp.

◆ implicit_typecast_followed()

void c_typecastt::implicit_typecast_followed ( exprt expr,
const typet src_type,
const typet orig_dest_type,
const typet dest_type 
)
protectedvirtual

Definition at line 522 of file c_typecast.cpp.

◆ minimum_promotion()

c_typecastt::c_typet c_typecastt::minimum_promotion ( const typet type) const
protected

Definition at line 470 of file c_typecast.cpp.

Member Data Documentation

◆ errors

std::list<std::string> c_typecastt::errors

Definition at line 66 of file c_typecast.h.

◆ ns

const namespacet& c_typecastt::ns
protected

Definition at line 74 of file c_typecast.h.

◆ warnings

std::list<std::string> c_typecastt::warnings

Definition at line 67 of file c_typecast.h.


The documentation for this class was generated from the following files: