File tree 1 file changed +4
-0
lines changed 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ static void remove_vector(exprt &expr)
103
103
// x+y -> vector(x[0]+y[0],x[1]+y[1],...)
104
104
array_exprt array_expr ({}, array_type);
105
105
array_expr.operands ().resize (numeric_cast_v<std::size_t >(dimension));
106
+ array_expr.add_source_location () = expr.source_location ();
106
107
107
108
for (std::size_t i=0 ; i<array_expr.operands ().size (); i++)
108
109
{
@@ -130,6 +131,7 @@ static void remove_vector(exprt &expr)
130
131
// -x -> vector(-x[0],-x[1],...)
131
132
array_exprt array_expr ({}, array_type);
132
133
array_expr.operands ().resize (numeric_cast_v<std::size_t >(dimension));
134
+ array_expr.add_source_location () = expr.source_location ();
133
135
134
136
for (std::size_t i=0 ; i<array_expr.operands ().size (); i++)
135
137
{
@@ -158,7 +160,9 @@ static void remove_vector(exprt &expr)
158
160
numeric_cast_v<std::size_t >(to_constant_expr (array_type.size ()));
159
161
exprt casted_op =
160
162
typecast_exprt::conditional_cast (op, array_type.subtype ());
163
+ source_locationt source_location = expr.source_location ();
161
164
expr = array_exprt (exprt::operandst (dimension, casted_op), array_type);
165
+ expr.add_source_location () = std::move (source_location);
162
166
}
163
167
}
164
168
}
You can’t perform that action at this time.
0 commit comments