cprover
cpp_typecheck_constructor.cpp File Reference

C++ Language Type Checking. More...

#include "cpp_typecheck.h"
#include <util/arith_tools.h>
#include <util/std_code.h>
#include <util/std_expr.h>
#include <util/c_types.h>
#include "cpp_util.h"
Include dependency graph for cpp_typecheck_constructor.cpp:

Go to the source code of this file.

Functions

static void copy_parent (const source_locationt &source_location, const irep_idt &parent_base_name, const irep_idt &arg_name, exprt &block)
 
static void copy_member (const source_locationt &source_location, const irep_idt &member_base_name, const irep_idt &arg_name, exprt &block)
 
static void copy_array (const source_locationt &source_location, const irep_idt &member_base_name, mp_integer i, const irep_idt &arg_name, exprt &block)
 

Detailed Description

C++ Language Type Checking.

Definition in file cpp_typecheck_constructor.cpp.

Function Documentation

◆ copy_array()

static void copy_array ( const source_locationt source_location,
const irep_idt member_base_name,
mp_integer  i,
const irep_idt arg_name,
exprt block 
)
static
Parameters
member_base_namename of array member
indexindex to copy
blocknon-typechecked block
Returns
generate code to copy the member

Definition at line 111 of file cpp_typecheck_constructor.cpp.

References irept::add(), exprt::add_source_location(), exprt::copy_to_operands(), from_integer(), irept::get_sub(), irept::id(), index_type(), exprt::op0(), exprt::op1(), exprt::operands(), and irept::set().

Referenced by cpp_typecheckt::default_assignop_value().

◆ copy_member()

static void copy_member ( const source_locationt source_location,
const irep_idt member_base_name,
const irep_idt arg_name,
exprt block 
)
static
Parameters
member_base_namename of a member
blocknon-typechecked block
Returns
generate code to copy the member

Definition at line 66 of file cpp_typecheck_constructor.cpp.

References irept::add(), exprt::add_source_location(), irept::get_sub(), irept::id(), exprt::op0(), exprt::op1(), exprt::operands(), and irept::set().

Referenced by cpp_typecheckt::default_assignop_value().

◆ copy_parent()

static void copy_parent ( const source_locationt source_location,
const irep_idt parent_base_name,
const irep_idt arg_name,
exprt block 
)
static
Parameters
parent_base_namebase name of typechecked parent
blocknon-typechecked block
Returns
generate code to copy the parent

Definition at line 25 of file cpp_typecheck_constructor.cpp.

References exprt::add_source_location(), cpp_namet::as_type(), irept::get_sub(), irept::id(), exprt::op0(), exprt::op1(), exprt::operands(), irept::set(), codet::set_statement(), typet::subtype(), to_code(), and exprt::type().

Referenced by cpp_typecheckt::default_assignop_value(), and cpp_typecheckt::default_cpctor().