Skip to content

Commit 8cb2f6e

Browse files
committed
Do not create a reference when building a new object
by bad: will be squashed.
1 parent c7c9708 commit 8cb2f6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/goto-harness/recursive_initialization.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ code_blockt recursive_initializationt::build_pointer_constructor(
554554
const symbol_exprt &local_result =
555555
get_fresh_local_typed_symexpr("local_result", type, nullptr_expr);
556556
then_case.add(code_declt{local_result});
557-
const namespacet &ns{goto_model.symbol_table};
557+
const namespacet ns{goto_model.symbol_table};
558558
then_case.add(code_function_callt{
559559
local_result, get_malloc_function(), {*size_of_expr(type.subtype(), ns)}});
560560
initialize(
@@ -631,7 +631,7 @@ code_blockt recursive_initializationt::build_struct_constructor(
631631
const typet &struct_type = result.type().subtype();
632632
PRECONDITION(struct_type.id() == ID_struct_tag);
633633
code_blockt body{};
634-
const namespacet &ns{goto_model.symbol_table};
634+
const namespacet ns{goto_model.symbol_table};
635635
for(const auto &component :
636636
ns.follow_tag(to_struct_tag_type(struct_type)).components())
637637
{
@@ -693,7 +693,7 @@ code_blockt recursive_initializationt::build_dynamic_array_constructor(
693693
const symbol_exprt &local_result =
694694
get_fresh_local_typed_symexpr("local_result", pointer_type, exprt{});
695695
body.add(code_declt{local_result});
696-
const namespacet &ns{goto_model.symbol_table};
696+
const namespacet ns{goto_model.symbol_table};
697697
for(auto array_size = min_array_size; array_size <= max_array_size;
698698
++array_size)
699699
{

0 commit comments

Comments
 (0)