cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
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
17
class
cpp_typecastt
:
public
c_typecastt
18
{
19
public
:
20
explicit
cpp_typecastt
(
cpp_typecheckt
&
cpp_typecheck
);
21
22
virtual
void
implicit_typecast
(
23
exprt
&expr,
24
const
typet
&type);
25
26
virtual
void
implicit_typecast_arithmetic
(
27
exprt
&expr);
28
29
virtual
void
implicit_typecast_arithmetic
(
30
exprt
&expr1,
31
exprt
&expr2);
32
33
protected
:
34
virtual
void
implicit_typecast_followed
(
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
:
44
void
check_qualifiers
(
45
const
typet
&from,
46
const
typet
&to);
47
48
bool
subtype_typecast
(
49
const
typet
&from,
50
const
typet
&to,
51
std::string &err);
52
53
bool
integral_conversion
(
54
const
typet
&src_type,
55
const
typet
&dest_type);
56
57
exprt
subtype_offset
(
58
const
struct_typet
&from,
59
const
struct_typet
&to);
60
61
void
make_ptr_typecast
(
62
exprt
&expr,
63
const
typet
&src_type,
64
const
typet
&dest_type);
65
66
cpp_typecheckt
&
cpp_typecheck
;
67
};
68
69
#endif
// CPROVER_CPP_CPP_TYPECAST_H
c_typecast.h
c_typecastt::c_typecastt
c_typecastt(const namespacet &_ns)
Definition
c_typecast.h:47
cpp_typecastt::integral_conversion
bool integral_conversion(const typet &src_type, const typet &dest_type)
cpp_typecastt::implicit_typecast_arithmetic
virtual void implicit_typecast_arithmetic(exprt &expr)
cpp_typecastt::implicit_typecast_arithmetic
virtual void implicit_typecast_arithmetic(exprt &expr1, exprt &expr2)
cpp_typecastt::cpp_typecastt
cpp_typecastt(cpp_typecheckt &cpp_typecheck)
cpp_typecastt::subtype_typecast
bool subtype_typecast(const typet &from, const typet &to, std::string &err)
cpp_typecastt::get_bases
void get_bases(const irep_idt &identifier, std::map< irep_idt, unsigned > &base_count)
cpp_typecastt::subtype_offset
exprt subtype_offset(const struct_typet &from, const struct_typet &to)
cpp_typecastt::implicit_typecast_followed
virtual void implicit_typecast_followed(exprt &expr, const typet &src_type, const typet &dest_type)
cpp_typecastt::check_qualifiers
void check_qualifiers(const typet &from, const typet &to)
cpp_typecastt::implicit_typecast
virtual void implicit_typecast(exprt &expr, const typet &type)
cpp_typecastt::make_ptr_typecast
void make_ptr_typecast(exprt &expr, const typet &src_type, const typet &dest_type)
cpp_typecastt::cpp_typecheck
cpp_typecheckt & cpp_typecheck
Definition
cpp_typecast.h:66
cpp_typecheckt
Definition
cpp_typecheck.h:43
exprt
Base class for all expressions.
Definition
expr.h:57
struct_typet
Structure type, corresponds to C style structs.
Definition
std_types.h:231
typet
The type of an expression, extends irept.
Definition
type.h:29
irep_idt
dstringt irep_idt
Definition
verification_result.h:16
cpp
cpp_typecast.h
Generated by
1.17.0