Skip to content

Commit 05ed608

Browse files
Merge pull request diffblue#251 from diffblue/revert-218-issue178
Revert "Fix pointer types when converting write_stacks to expressions"
2 parents 69a05d2 + 72e3704 commit 05ed608

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/analyses/variable-sensitivity/write_stack.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ exprt write_stackt::to_expression() const
187187
new_expr.operands().resize(1);
188188
}
189189
new_expr.op0()=access_expr;
190-
// also need to update the type of new_expr because the index_exprt
191-
// will have been constructed with a nil op0 and therefore will not
192-
// have had its type constructed properly.
193-
new_expr.type()=access_expr.type().subtype();
194190

195191
access_expr=new_expr;
196192
}

src/analyses/variable-sensitivity/write_stack_entry.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ offset_entryt::offset_entryt(abstract_object_pointert offset_value):
4646
}
4747

4848
/// Get the expression part needed to read this stack entry. For offset entries
49-
/// this is an index expression with the index() part the offset.
50-
/// It is important to note that the returned index_exprt does not have a type,
51-
/// so it will be necessary for the caller to update the type whenever the index
52-
/// expression is completed.
53-
/// \return The untyped expression to read this part of the stack
49+
/// this is an index expression with the index() part the offset
50+
/// \return The expression to read this part of the stack
5451
exprt offset_entryt::get_access_expr() const
5552
{
5653
return index_exprt(exprt(), offset->to_constant());

0 commit comments

Comments
 (0)