File tree 3 files changed +15
-7
lines changed
3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -1062,17 +1062,20 @@ void value_sett::get_reference_set(
1062
1062
dest.push_back (to_expr (it));
1063
1063
}
1064
1064
1065
- static void strip_casts (exprt& e, const namespacet& ns, const typet& target_type_raw)
1065
+ static void strip_casts (
1066
+ exprt &e,
1067
+ const namespacet &ns,
1068
+ const typet &target_type_raw)
1066
1069
{
1067
- const auto & target_type=ns.follow (target_type_raw);
1070
+ const auto & target_type=ns.follow (target_type_raw);
1068
1071
while (true )
1069
1072
{
1070
1073
if (e.id ()==ID_typecast)
1071
1074
e=e.op0 ();
1072
1075
else if (e.id ()==ID_member)
1073
1076
{
1074
- auto & mem=to_member_expr (e);
1075
- const auto & struct_type=to_struct_type (ns.follow (e.op0 ().type ()));
1077
+ auto & mem=to_member_expr (e);
1078
+ const auto & struct_type=to_struct_type (ns.follow (e.op0 ().type ()));
1076
1079
if (mem.get_component_name ()==struct_type.components ()[0 ].get_name ())
1077
1080
e=e.op0 ();
1078
1081
else
@@ -1234,7 +1237,7 @@ void value_sett::get_reference_set_rec(
1234
1237
{
1235
1238
// Avoid an infinite loop of casting by stripping typecasts
1236
1239
// and address-of-first-members first.
1237
- strip_casts (member_expr.op0 (),ns,struct_op.type ());
1240
+ strip_casts (member_expr.op0 (), ns, struct_op.type ());
1238
1241
if (ns.follow (member_expr.op0 ().type ())!=ns.follow (struct_op.type ()))
1239
1242
member_expr.op0 ().make_typecast (struct_op.type ());
1240
1243
}
Original file line number Diff line number Diff line change @@ -113,7 +113,10 @@ class value_sett
113
113
{
114
114
}
115
115
116
- entryt (const idt &_identifier, const std::string &_suffix, const typet &_declared_on_type):
116
+ entryt (
117
+ const idt &_identifier,
118
+ const std::string &_suffix,
119
+ const typet &_declared_on_type):
117
120
identifier (_identifier),
118
121
suffix (_suffix),
119
122
declared_on_type (_declared_on_type)
Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ class value_set_domaint:public domain_baset
63
63
break ;
64
64
65
65
case END_FUNCTION:
66
- value_set.do_end_function (static_analysis_baset::get_return_lhs (to_l), ns);
66
+ value_set.do_end_function (
67
+ static_analysis_baset::get_return_lhs (to_l),
68
+ ns);
67
69
break ;
68
70
69
71
case RETURN:
You can’t perform that action at this time.
0 commit comments