Skip to content

Commit b0b44fa

Browse files
author
Sonny Martin
committed
Clang-format cleanup
1 parent 1c7a8ab commit b0b44fa

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

src/util/simplify_expr.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,8 @@ bool simplify_exprt::simplify_update(exprt &expr)
13651365
{
13661366
const irep_idt &component_name=
13671367
e.get(ID_component_name);
1368-
const struct_typet &value_ptr_struct_type=to_struct_type(value_ptr_type);
1368+
const struct_typet &value_ptr_struct_type =
1369+
to_struct_type(value_ptr_type);
13691370
if(!value_ptr_struct_type.has_component(component_name))
13701371
return true;
13711372
auto &designator_as_struct_expr = to_struct_expr(*value_ptr);
@@ -1402,8 +1403,8 @@ bool simplify_exprt::simplify_object(exprt &expr)
14021403
}
14031404
else if(expr.id()==ID_typecast)
14041405
{
1405-
auto const& typecast_expr = to_typecast_expr(expr);
1406-
const typet &op_type=ns.follow(typecast_expr.op().type());
1406+
auto const &typecast_expr = to_typecast_expr(expr);
1407+
const typet &op_type = ns.follow(typecast_expr.op().type());
14071408

14081409
if(op_type.id()==ID_pointer)
14091410
{
@@ -1419,10 +1420,11 @@ bool simplify_exprt::simplify_object(exprt &expr)
14191420
// We do a bit of special treatment for (TYPE *)(a+(int)&o) and
14201421
// (TYPE *)(a+(int)((T*)&o+x)), which are re-written to '&o'.
14211422

1422-
exprt casted_expr=typecast_expr.op();
1423-
if(casted_expr.id()==ID_plus && casted_expr.operands().size()==2)
1423+
exprt casted_expr = typecast_expr.op();
1424+
if(casted_expr.id() == ID_plus && casted_expr.operands().size() == 2)
14241425
{
1425-
exprt cand=casted_expr.op0().id()==ID_typecast?casted_expr.op0():casted_expr.op1();
1426+
exprt cand = casted_expr.op0().id() == ID_typecast ? casted_expr.op0()
1427+
: casted_expr.op1();
14261428

14271429
if(cand.id()==ID_typecast &&
14281430
cand.operands().size()==1 &&

src/util/simplify_expr_boolean.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,8 @@ bool simplify_exprt::simplify_not(exprt &expr)
213213
}
214214
else if(op.id()==ID_exists) // !(exists: a) <-> forall: not a
215215
{
216-
auto const& op_as_exists = to_exists_expr(op);
217-
forall_exprt rewritten_op(op_as_exists.symbol()
218-
, op_as_exists.where());
216+
auto const &op_as_exists = to_exists_expr(op);
217+
forall_exprt rewritten_op(op_as_exists.symbol(), op_as_exists.where());
219218
rewritten_op.where().make_not();
220219
simplify_node(rewritten_op.where());
221220
expr = rewritten_op;

src/util/std_expr.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4515,17 +4515,19 @@ class exists_exprt:public quantifier_exprt
45154515
inline const exists_exprt &to_exists_expr(const exprt &expr)
45164516
{
45174517
PRECONDITION(expr.id() == ID_exists);
4518-
DATA_INVARIANT(expr.operands().size()== 2,
4518+
DATA_INVARIANT(
4519+
expr.operands().size() == 2,
45194520
"exists expressions have exactly two operands");
4520-
return static_cast<const exists_exprt&>(expr);
4521+
return static_cast<const exists_exprt &>(expr);
45214522
}
45224523

45234524
inline exists_exprt &to_exists_expr(exprt &expr)
45244525
{
45254526
PRECONDITION(expr.id() == ID_exists);
4526-
DATA_INVARIANT(expr.operands().size()== 2,
4527-
"exists expressions have exactly two operands");
4528-
return static_cast<exists_exprt&>(expr);
4527+
DATA_INVARIANT(
4528+
expr.operands().size() == 2,
4529+
"exists expressions have exactly two operands");
4530+
return static_cast<exists_exprt &>(expr);
45294531
}
45304532

45314533
/// \brief The popcount (counting the number of bits set to 1) expression

0 commit comments

Comments
 (0)