Skip to content

Commit a6ddfc3

Browse files
committed
Construct side_effect_expr_function_callt in a non-deprecated way
The constructor requires four arguments.
1 parent 3fe359e commit a6ddfc3

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/goto-instrument/goto_program2code.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,13 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
342342
{this_va_list_expr});
343343
f.arguments().back().type().id(ID_gcc_builtin_va_list);
344344

345-
side_effect_expr_function_callt type_of;
346-
type_of.function() =
347-
symbol_exprt("__typeof__", code_typet({}, empty_typet()));
345+
// we do not bother to set the correct types here, they are not relevant for
346+
// generating the correct dumped output
347+
side_effect_expr_function_callt type_of(
348+
symbol_exprt("__typeof__", code_typet({}, empty_typet())),
349+
{},
350+
typet{},
351+
source_locationt{});
348352

349353
// if the return value is used, the next instruction will be assign
350354
goto_programt::const_targett next=target;
@@ -486,9 +490,8 @@ goto_programt::const_targett goto_program2codet::convert_decl(
486490
{
487491
// could hack this by just erasing the first operand
488492
const code_function_callt &f=to_code_function_call(next->code);
489-
side_effect_expr_function_callt call;
490-
call.function()=f.function();
491-
call.arguments()=f.arguments();
493+
side_effect_expr_function_callt call(
494+
f.function(), f.arguments(), typet{}, source_locationt{});
492495
d.copy_to_operands(call);
493496
}
494497

@@ -1935,10 +1938,8 @@ void goto_program2codet::cleanup_expr(exprt &expr, bool no_typecast)
19351938
symbol_exprt symbol_expr(symbol.name, symbol.type);
19361939
symbol_expr.add_source_location()=expr.source_location();
19371940

1938-
side_effect_expr_function_callt call;
1939-
call.add_source_location()=expr.source_location();
1940-
call.function()=symbol_expr;
1941-
call.type()=expr.type();
1941+
side_effect_expr_function_callt call(
1942+
symbol_expr, {}, expr.type(), expr.source_location());
19421943

19431944
expr.swap(call);
19441945
}

src/jsil/parser.y

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ instruction: TOK_LABEL TOK_IDENTIFIER
260260
rhs: expression
261261
| proc_ident_expr '(' expressions_opt ')' with_opt
262262
{
263-
side_effect_expr_function_callt f;
264-
f.function().swap(stack($1));
263+
side_effect_expr_function_callt f(stack($1), {}, typet{}, {});
265264
if(stack($3).is_not_nil())
266265
f.arguments().swap(stack($3).operands());
267266

0 commit comments

Comments
 (0)