Skip to content

Commit 88a6af8

Browse files
author
Daniel Kroening
committed
complete constructors for function_application_exprt
1 parent 3e7bc8e commit 88a6af8

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

src/goto-programs/builtin_functions.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -900,11 +900,7 @@ void goto_convertt::do_function_call_symbol(
900900
if(lhs.is_nil())
901901
return;
902902

903-
function_application_exprt rhs;
904-
rhs.type()=lhs.type();
905-
rhs.add_source_location()=function.source_location();
906-
rhs.function()=function;
907-
rhs.arguments()=arguments;
903+
function_application_exprt rhs(function, arguments, lhs.type());
908904

909905
code_assignt assignment(lhs, rhs);
910906
assignment.add_source_location()=function.source_location();

src/util/std_expr.h

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4333,22 +4333,16 @@ class null_pointer_exprt:public constant_exprt
43334333
class function_application_exprt:public binary_exprt
43344334
{
43354335
public:
4336-
function_application_exprt():binary_exprt(ID_function_application)
4337-
{
4338-
op0()=symbol_exprt();
4339-
}
4340-
4341-
explicit function_application_exprt(const typet &_type):
4342-
binary_exprt(ID_function_application, _type)
4343-
{
4344-
op0()=symbol_exprt();
4345-
}
4336+
using argumentst = exprt::operandst;
43464337

43474338
function_application_exprt(
4348-
const symbol_exprt &_function, const typet &_type):
4349-
function_application_exprt(_type) // NOLINT(runtime/explicit)
4339+
const symbol_exprt &_function,
4340+
const argumentst &_arguments,
4341+
const typet &_type)
4342+
: binary_exprt(ID_function_application, _type) // NOLINT(runtime/explicit)
43504343
{
43514344
function()=_function;
4345+
arguments() = _arguments;
43524346
}
43534347

43544348
symbol_exprt &function()
@@ -4361,8 +4355,6 @@ class function_application_exprt:public binary_exprt
43614355
return static_cast<const symbol_exprt &>(op0());
43624356
}
43634357

4364-
typedef exprt::operandst argumentst;
4365-
43664358
argumentst &arguments()
43674359
{
43684360
return op1().operands();

0 commit comments

Comments
 (0)