Skip to content

Commit fdea979

Browse files
committed
apply clang format
1 parent 23407b0 commit fdea979

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

src/analyses/variable-sensitivity/constant_pointer_abstract_object.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#include "constant_pointer_abstract_object.h"
1212
#include <analyses/ai.h>
1313
#include <analyses/variable-sensitivity/abstract_enviroment.h>
14+
#include <langapi/language_util.h>
1415
#include <util/std_expr.h>
1516
#include <util/std_types.h>
16-
#include <langapi/language_util.h>
1717

1818
constant_pointer_abstract_objectt::constant_pointer_abstract_objectt(
1919
const typet &type)
@@ -77,11 +77,11 @@ bool constant_pointer_abstract_objectt::same_target(
7777
auto cast_other =
7878
std::dynamic_pointer_cast<const constant_pointer_abstract_objectt>(other);
7979

80-
if (value_stack.is_top_value() || cast_other->value_stack.is_top_value())
80+
if(value_stack.is_top_value() || cast_other->value_stack.is_top_value())
8181
return false;
8282

83-
bool matching_pointer =
84-
value_stack.target_expression() == cast_other->value_stack.target_expression();
83+
bool matching_pointer = value_stack.target_expression() ==
84+
cast_other->value_stack.target_expression();
8585

8686
return matching_pointer;
8787
}
@@ -92,13 +92,14 @@ exprt constant_pointer_abstract_objectt::offset_from(
9292
auto cast_other =
9393
std::dynamic_pointer_cast<const constant_pointer_abstract_objectt>(other);
9494

95-
if (value_stack.is_top_value() || cast_other->value_stack.is_top_value())
95+
if(value_stack.is_top_value() || cast_other->value_stack.is_top_value())
9696
return nil_exprt();
9797

98-
return minus_exprt(value_stack.offset_expression(), cast_other->value_stack.offset_expression());
98+
return minus_exprt(
99+
value_stack.offset_expression(),
100+
cast_other->value_stack.offset_expression());
99101
}
100102

101-
102103
abstract_object_pointert
103104
constant_pointer_abstract_objectt::merge_constant_pointers(
104105
const constant_pointer_abstract_pointert other) const

src/analyses/variable-sensitivity/pointer_abstract_object.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ abstract_object_pointert pointer_abstract_objectt::expression_transform(
4848
}
4949
if(expr.id() == ID_ptr_diff)
5050
{
51-
auto& rhs = operands[1];
52-
if (same_target(rhs)) {
51+
auto &rhs = operands[1];
52+
if(same_target(rhs))
53+
{
5354
return environment.eval(offset_from(rhs), ns);
5455
}
5556
}

src/analyses/variable-sensitivity/pointer_abstract_object.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ class pointer_abstract_objectt : public abstract_objectt
9797
protected:
9898
CLONE
9999

100-
virtual bool same_target(abstract_object_pointert other) const {
100+
virtual bool same_target(abstract_object_pointert other) const
101+
{
101102
return false;
102103
}
103-
virtual exprt offset_from(abstract_object_pointert other) const {
104+
virtual exprt offset_from(abstract_object_pointert other) const
105+
{
104106
return nil_exprt();
105107
}
106108

src/analyses/variable-sensitivity/write_stack.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
#include <unordered_set>
1616

17+
#include <langapi/language_util.h>
1718
#include <util/arith_tools.h>
1819
#include <util/c_types.h>
1920
#include <util/std_expr.h>
20-
#include <langapi/language_util.h>
2121

2222
/// Build a topstack
2323
write_stackt::write_stackt() : stack(), top_stack(true)
@@ -212,7 +212,6 @@ exprt write_stackt::offset_expression() const
212212
return stack[1]->get_access_expr().operands()[1];
213213
}
214214

215-
216215
/// Is the stack representing an unknown value and hence can't be written to
217216
/// or read from.
218217
/// \return True if the stack is top.

src/util/simplify_expr_int.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,10 @@ simplify_exprt::resultt<> simplify_exprt::simplify_plus(const plus_exprt &expr)
451451
}
452452

453453
// (T*)p+a - don't simplify any further
454-
if (expr.type().id() == ID_pointer && expr.operands().size() == 2
455-
&& is_number(expr.op1().type())) {
454+
if(
455+
expr.type().id() == ID_pointer && expr.operands().size() == 2 &&
456+
is_number(expr.op1().type()))
457+
{
456458
return unchanged(expr);
457459
}
458460

src/util/std_expr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,6 @@ inline ptr_diff_exprt to_ptr_diff_expr(const minus_exprt &expr)
10121012
return ptr_diff_exprt(expr);
10131013
}
10141014

1015-
10161015
/// \brief Binary multiplication
10171016
/// Associativity is not specified.
10181017
class mult_exprt:public multi_ary_exprt

0 commit comments

Comments
 (0)