Skip to content

Do not shadow "bv" [blocks: #2310] #3803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2019
Merged
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
10 changes: 4 additions & 6 deletions src/solvers/flattening/bv_pointers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@ bvt bv_pointerst::convert_pointer_type(const exprt &expr)
if(it->type().id()!=ID_unsignedbv &&
it->type().id()!=ID_signedbv)
{
bvt bv;
conversion_failed(plus_expr, bv);
return bv;
bvt failed_bv;
conversion_failed(plus_expr, failed_bv);
return failed_bv;
}

bv_utilst::representationt rep=
Expand Down Expand Up @@ -398,8 +398,6 @@ bvt bv_pointerst::convert_pointer_type(const exprt &expr)
minus_expr.op0().type().id() == ID_pointer,
"first operand should be of pointer type");

bvt bv;

if(
minus_expr.op1().type().id() != ID_unsignedbv &&
minus_expr.op1().type().id() != ID_signedbv)
Expand All @@ -411,7 +409,7 @@ bvt bv_pointerst::convert_pointer_type(const exprt &expr)

const unary_minus_exprt neg_op1(minus_expr.op1());

bv = convert_bv(minus_expr.op0());
bvt bv = convert_bv(minus_expr.op0());

typet pointer_sub_type = minus_expr.op0().type().subtype();
mp_integer element_size;
Expand Down