Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2e9cd84

Browse files
committedJan 21, 2019
Construct side_effect_expr_function_callt in a non-deprecated way
The constructor requires four arguments.
1 parent c8ea79f commit 2e9cd84

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed
 

‎src/goto-instrument/goto_program2code.cpp

+4-10
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,8 @@ 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+
side_effect_expr_function_callt type_of(
346+
symbol_exprt("__typeof__", code_typet({}, empty_typet())), {}, typet{}, source_locationt{});
348347

349348
// if the return value is used, the next instruction will be assign
350349
goto_programt::const_targett next=target;
@@ -486,9 +485,7 @@ goto_programt::const_targett goto_program2codet::convert_decl(
486485
{
487486
// could hack this by just erasing the first operand
488487
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();
488+
side_effect_expr_function_callt call(f.function(), f.arguments(), typet{}, source_locationt{});
492489
d.copy_to_operands(call);
493490
}
494491

@@ -1920,10 +1917,7 @@ void goto_program2codet::cleanup_expr(exprt &expr, bool no_typecast)
19201917
symbol_exprt symbol_expr(symbol.name, symbol.type);
19211918
symbol_expr.add_source_location()=expr.source_location();
19221919

1923-
side_effect_expr_function_callt call;
1924-
call.add_source_location()=expr.source_location();
1925-
call.function()=symbol_expr;
1926-
call.type()=expr.type();
1920+
side_effect_expr_function_callt call(symbol_expr, {}, expr.type(), expr.source_location());
19271921

19281922
expr.swap(call);
19291923
}

0 commit comments

Comments
 (0)
Please sign in to comment.