File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 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)
103103 // x+y -> vector(x[0]+y[0],x[1]+y[1],...)
104104 array_exprt array_expr ({}, array_type);
105105 array_expr.operands ().resize (numeric_cast_v<std::size_t >(dimension));
106+ array_expr.add_source_location () = expr.source_location ();
106107
107108 for (std::size_t i=0 ; i<array_expr.operands ().size (); i++)
108109 {
@@ -130,6 +131,7 @@ static void remove_vector(exprt &expr)
130131 // -x -> vector(-x[0],-x[1],...)
131132 array_exprt array_expr ({}, array_type);
132133 array_expr.operands ().resize (numeric_cast_v<std::size_t >(dimension));
134+ array_expr.add_source_location () = expr.source_location ();
133135
134136 for (std::size_t i=0 ; i<array_expr.operands ().size (); i++)
135137 {
@@ -158,7 +160,9 @@ static void remove_vector(exprt &expr)
158160 numeric_cast_v<std::size_t >(to_constant_expr (array_type.size ()));
159161 exprt casted_op =
160162 typecast_exprt::conditional_cast (op, array_type.subtype ());
163+ source_locationt source_location = expr.source_location ();
161164 expr = array_exprt (exprt::operandst (dimension, casted_op), array_type);
165+ expr.add_source_location () = std::move (source_location);
162166 }
163167 }
164168 }
You can’t perform that action at this time.
0 commit comments