CBMC
cpp_typecast.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_CPP_CPP_TYPECAST_H
11 #define CPROVER_CPP_CPP_TYPECAST_H
12 
13 #include <ansi-c/c_typecast.h>
14 
15 class cpp_typecheckt;
16 
18 {
19 public:
21 
22  virtual void implicit_typecast(
23  exprt &expr,
24  const typet &type);
25 
27  exprt &expr);
28 
30  exprt &expr1,
31  exprt &expr2);
32 
33 protected:
35  exprt &expr,
36  const typet &src_type,
37  const typet &dest_type);
38 
39  void get_bases(
40  const irep_idt &identifier,
41  std::map<irep_idt, unsigned> &base_count);
42 
43 public:
45  const typet &from,
46  const typet &to);
47 
49  const typet &from,
50  const typet &to,
51  std::string &err);
52 
54  const typet &src_type,
55  const typet &dest_type);
56 
58  const struct_typet &from,
59  const struct_typet &to);
60 
62  exprt &expr,
63  const typet &src_type,
64  const typet &dest_type);
65 
67 };
68 
69 #endif // CPROVER_CPP_CPP_TYPECAST_H
bool integral_conversion(const typet &src_type, const typet &dest_type)
virtual void implicit_typecast_arithmetic(exprt &expr)
virtual void implicit_typecast_arithmetic(exprt &expr1, exprt &expr2)
cpp_typecastt(cpp_typecheckt &cpp_typecheck)
bool subtype_typecast(const typet &from, const typet &to, std::string &err)
void get_bases(const irep_idt &identifier, std::map< irep_idt, unsigned > &base_count)
exprt subtype_offset(const struct_typet &from, const struct_typet &to)
virtual void implicit_typecast_followed(exprt &expr, const typet &src_type, const typet &dest_type)
void check_qualifiers(const typet &from, const typet &to)
virtual void implicit_typecast(exprt &expr, const typet &type)
void make_ptr_typecast(exprt &expr, const typet &src_type, const typet &dest_type)
cpp_typecheckt & cpp_typecheck
Definition: cpp_typecast.h:66
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
Base class for all expressions.
Definition: expr.h:56
Structure type, corresponds to C style structs.
Definition: std_types.h:231
The type of an expression, extends irept.
Definition: type.h:29
void err(int eval, const char *fmt,...)
Definition: err.c:13