@@ -260,26 +260,26 @@ void goto_convertt::do_scanf(
260
260
261
261
for (const auto &t : token_list)
262
262
{
263
- typet type= get_type (t);
263
+ const auto type = get_type (t);
264
264
265
- if (type.is_not_nil ())
265
+ if (type.has_value ())
266
266
{
267
267
if (argument_number<arguments.size ())
268
268
{
269
269
const typecast_exprt ptr (
270
- arguments[argument_number], pointer_type (type));
270
+ arguments[argument_number], pointer_type (* type));
271
271
argument_number++;
272
272
273
- if (type. id ()== ID_array)
273
+ if (type-> id () == ID_array)
274
274
{
275
275
#if 0
276
276
// A string. We first need a nondeterministic size.
277
277
exprt size=side_effect_expr_nondett(size_type());
278
- to_array_type(type).size()=size;
278
+ to_array_type(* type).size()=size;
279
279
280
280
const symbolt &tmp_symbol=
281
281
new_tmp_symbol(
282
- type, "scanf_string", dest, function.source_location());
282
+ * type, "scanf_string", dest, function.source_location());
283
283
284
284
const address_of_exprt rhs(
285
285
index_exprt(
@@ -298,9 +298,9 @@ void goto_convertt::do_scanf(
298
298
copy(array_copy_statement, OTHER, dest);
299
299
#else
300
300
const index_exprt new_lhs (
301
- dereference_exprt (ptr, type), from_integer (0 , index_type ()));
301
+ dereference_exprt (ptr, * type), from_integer (0 , index_type ()));
302
302
const side_effect_expr_nondett rhs (
303
- type. subtype (), function.source_location ());
303
+ type-> subtype (), function.source_location ());
304
304
code_assignt assign (new_lhs, rhs);
305
305
assign.add_source_location ()=function.source_location ();
306
306
copy (assign, ASSIGN, dest);
@@ -309,9 +309,9 @@ void goto_convertt::do_scanf(
309
309
else
310
310
{
311
311
// make it nondet for now
312
- const dereference_exprt new_lhs (ptr, type);
312
+ const dereference_exprt new_lhs (ptr, * type);
313
313
const side_effect_expr_nondett rhs (
314
- type, function.source_location ());
314
+ * type, function.source_location ());
315
315
code_assignt assign (new_lhs, rhs);
316
316
assign.add_source_location ()=function.source_location ();
317
317
copy (assign, ASSIGN, dest);
0 commit comments