Skip to content

Commit 127aa8c

Browse files
committed
Remove unnecessary variable
This expression is used exactly once and is a copy of an exprt that we have a const reference to.
1 parent d868948 commit 127aa8c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/pointer-analysis/value_set_dereference.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,6 @@ value_set_dereferencet::valuet value_set_dereferencet::build_reference_to(
575575
const typet &object_type = object.type();
576576
const typet &root_object_type = root_object.type();
577577

578-
exprt root_object_subexpression=root_object;
579-
580578
if(
581579
dereference_type_compare(object_type, dereference_type, ns) &&
582580
o.offset().is_zero())
@@ -640,7 +638,7 @@ value_set_dereferencet::valuet value_set_dereferencet::build_reference_to(
640638

641639
// try to build a member/index expression - do not use byte_extract
642640
auto subexpr = get_subexpression_at_offset(
643-
root_object_subexpression, o.offset(), dereference_type, ns);
641+
root_object, o.offset(), dereference_type, ns);
644642
if(subexpr.has_value())
645643
simplify(subexpr.value(), ns);
646644
if(

0 commit comments

Comments
 (0)