Skip to content

Commit 03e4dbc

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
committed
Construct code_typet in a non-deprecated way
The default constructor is deprecated.
1 parent f573d97 commit 03e4dbc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/goto-programs/builtin_functions.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ void goto_convertt::do_printf(
221221
else
222222
{
223223
printf_code.id(ID_code);
224-
printf_code.type()=typet(ID_code);
224+
printf_code.type() = code_typet(
225+
code_typet::parameterst(to_code_type(function.type()).parameters()),
226+
empty_typet());
225227
copy(to_code(printf_code), OTHER, dest);
226228
}
227229
}

src/jsil/jsil_typecheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void jsil_typecheckt::typecheck_expr_index(exprt &expr)
348348

349349
// special case for function identifiers
350350
if(expr.op1().id()=="fid" || expr.op1().id()=="constructid")
351-
expr.type()=code_typet();
351+
expr.type() = code_typet({}, typet());
352352
else
353353
expr.type()=jsil_value_type();
354354
}
@@ -802,7 +802,7 @@ void jsil_typecheckt::typecheck_function_call(
802802
// Should be function, declaration not found yet
803803
symbolt new_symbol;
804804
new_symbol.name=id;
805-
new_symbol.type=code_typet();
805+
new_symbol.type = code_typet({}, typet());
806806
new_symbol.mode="jsil";
807807
new_symbol.is_type=false;
808808
new_symbol.value=exprt("no-body-just-yet");

0 commit comments

Comments
 (0)