22 if(op.type().id() == ID_struct)
46 if(parameters.size()>ops.size())
49 ops.reserve(parameters.size());
51 for(std::size_t i=ops.size(); i<parameters.size(); i++)
53 const exprt &default_value=
54 parameters[i].default_value();
59 ops.push_back(default_value);
62 else if(parameters.size()<ops.size())
69 exprt::operandst::iterator it=ops.begin();
70 for(
const auto ¶meter : parameters)
82 DATA_INVARIANT(it != ops.end(),
"arguments and parameters must match");
83 const exprt &operand=*it;
84 typet type=parameter.type();
89 std::cout <<
"O: " << operand.
pretty() <<
'\n';
96 if(it == ops.begin() && parameter.get_this())
98 type.
set(ID_C_reference,
true);
99 type.
set(ID_C_this,
true);
113 operand, type, new_expr, rank))
118 std::cout <<
"OK " << rank <<
'\n';
122 operand.
id() == ID_initializer_list &&
cpp_typecheck.cpp_is_pod(type) &&
132 std::cout <<
"NOT OK\n";
141 for( ; it!=ops.end(); ++it)
std::vector< parametert > parameterst
bool has_ellipsis() const
const parameterst & parameters() const
exprt::operandst operands
bool match(const code_typet &code_type, unsigned &distance, cpp_typecheckt &cpp_typecheck) const
bool has_class_type() const
void build(const side_effect_expr_function_callt &function_call)
Base class for all expressions.
std::vector< exprt > operandst
typet & type()
Return the type of the expression.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & id() const
A side_effect_exprt representation of a function call side effect.
exprt::operandst & arguments()
The type of an expression, extends irept.
bool cpp_typecheck(cpp_parse_treet &cpp_parse_tree, symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler)
C++ Language Type Checking.
C++ Language Type Checking.
bool is_reference(const typet &type)
Returns true if the type is a reference.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
const unary_exprt & to_unary_expr(const exprt &expr)
Cast an exprt to a unary_exprt.