-
Notifications
You must be signed in to change notification settings - Fork 289
Expand file tree
/
Copy pathcpp_typecast.h
More file actions
69 lines (49 loc) · 1.36 KB
/
cpp_typecast.h
File metadata and controls
69 lines (49 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*******************************************************************\
Module:
Author: Daniel Kroening, [email protected]
\*******************************************************************/
#ifndef CPROVER_CPP_CPP_TYPECAST_H
#define CPROVER_CPP_CPP_TYPECAST_H
#include <ansi-c/c_typecast.h>
class cpp_typecheckt;
class cpp_typecastt:public c_typecastt
{
public:
explicit cpp_typecastt(cpp_typecheckt &cpp_typecheck);
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);
protected:
virtual void implicit_typecast_followed(
exprt &expr,
const typet &src_type,
const typet &dest_type);
void get_bases(
const irep_idt &identifier,
std::map<irep_idt, unsigned> &base_count);
public:
void check_qualifiers(
const typet &from,
const typet &to);
bool subtype_typecast(
const typet &from,
const typet &to,
std::string &err);
bool integral_conversion(
const typet &src_type,
const typet &dest_type);
exprt subtype_offset(
const struct_typet &from,
const struct_typet &to);
void make_ptr_typecast(
exprt &expr,
const typet &src_type,
const typet &dest_type);
cpp_typecheckt &cpp_typecheck;
};
#endif // CPROVER_CPP_CPP_TYPECAST_H