Skip to content

Commit eecaee0

Browse files
committed
Updates requested in the peer review.
1 parent 16c8bc8 commit eecaee0

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/analyses/goto_check.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1667,11 +1667,11 @@ void goto_checkt::goto_check(
16671667
{
16681668
// need to mark the dead variable as dead
16691669
goto_programt::targett t=new_code.add_instruction(ASSIGN);
1670-
exprt address_of_expr = address_of_exprt(variable);
1670+
address_of_exprt address_of_expr = address_of_exprt(variable);
16711671
exprt lhs=ns.lookup(CPROVER_PREFIX "dead_object").symbol_expr();
16721672
if(!base_type_eq(lhs.type(), address_of_expr.type(), ns))
16731673
address_of_expr.make_typecast(lhs.type());
1674-
exprt rhs = if_exprt(
1674+
if_exprt rhs = if_exprt(
16751675
side_effect_expr_nondett(bool_typet()),
16761676
address_of_expr,
16771677
lhs,

src/ansi-c/expr2c.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ std::string expr2ct::convert_allocate(const exprt &src, unsigned &precedence)
11241124
std::string op0 = convert_with_precedence(src.op0(), p0);
11251125

11261126
unsigned p1;
1127-
std::string op1 = convert_with_precedence(src.op1(), p1);
1127+
const std::string op1 = convert_with_precedence(src.op1(), p1);
11281128

11291129
std::string dest = "ALLOCATE";
11301130
dest += '(';

src/util/simplify_expr_boolean.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,10 @@ bool simplify_exprt::simplify_boolean(exprt &expr)
8484
if(it->type().id() != ID_bool)
8585
return true;
8686

87-
bool erase;
88-
8987
if(it->is_true())
90-
{
91-
erase = true;
9288
negate = !negate;
93-
}
94-
else
95-
erase = it->is_false();
9689

97-
if(erase)
90+
if(it->is_constant())
9891
{
9992
it = operands.erase(it);
10093
result = false;

0 commit comments

Comments
 (0)