Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/goto-programs/builtin_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ void goto_convertt::do_cpp_new(
if(new_array)
new_call.arguments().push_back(count);
new_call.arguments().push_back(object_size);
new_call.set("#type", lhs.type().subtype());
new_call.set(ID_C_cxx_alloc_type, lhs.type().subtype());
new_call.lhs()=tmp_symbol_expr;
new_call.add_source_location()=rhs.source_location();

Expand Down Expand Up @@ -612,7 +612,7 @@ void goto_convertt::do_cpp_new(
new_call.arguments().push_back(count);
new_call.arguments().push_back(object_size);
new_call.arguments().push_back(rhs.op0()); // memory location
new_call.set("#type", lhs.type().subtype());
new_call.set(ID_C_cxx_alloc_type, lhs.type().subtype());
new_call.lhs()=tmp_symbol_expr;
new_call.add_source_location()=rhs.source_location();

Expand Down
2 changes: 1 addition & 1 deletion src/pointer-analysis/value_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ void value_sett::get_value_set_rec(
assert(suffix=="");

const typet &dynamic_type=
static_cast<const typet &>(expr.find("#type"));
static_cast<const typet &>(expr.find(ID_C_cxx_alloc_type));

dynamic_object_exprt dynamic_object(dynamic_type);
dynamic_object.set_instance(location_number);
Expand Down
2 changes: 1 addition & 1 deletion src/pointer-analysis/value_set_fivr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ void value_set_fivrt::get_value_set_rec(
assert(suffix=="");

const typet &dynamic_type=
static_cast<const typet &>(expr.find("#type"));
static_cast<const typet &>(expr.find(ID_C_cxx_alloc_type));

dynamic_object_exprt dynamic_object(dynamic_type);
// let's make up a `unique' number for this object...
Expand Down
2 changes: 1 addition & 1 deletion src/pointer-analysis/value_set_fivrns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ void value_set_fivrnst::get_value_set_rec(
assert(suffix=="");

const typet &dynamic_type=
static_cast<const typet &>(expr.find("#type"));
static_cast<const typet &>(expr.find(ID_C_cxx_alloc_type));

dynamic_object_exprt dynamic_object(dynamic_type);
// let's make up a `unique' number for this object...
Expand Down
1 change: 1 addition & 0 deletions src/util/irep_ids.def
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ IREP_ID_ONE(main)
IREP_ID_ONE(expression)
IREP_ID_ONE(free)
IREP_ID_ONE(malloc)
IREP_ID_TWO(C_cxx_alloc_type, #cxx_alloc_type)
IREP_ID_ONE(cpp_new)
IREP_ID_ONE(cpp_delete)
IREP_ID_TWO(cpp_new_array, cpp_new[])
Expand Down