File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -99,19 +99,6 @@ class value_set_domain_templatet : public ai_domain_baset
9999 value_set.get_reference_set (expr, dest, ns);
100100 }
101101
102- exprt get_return_lhs (locationt to) const
103- {
104- // get predecessor of "to"
105- to--;
106-
107- if (to->is_end_function ())
108- return static_cast <const exprt &>(get_nil_irep ());
109-
110- INVARIANT (to->is_function_call (), " must be the function call" );
111-
112- return to->call_lhs ();
113- }
114-
115102 xmlt output_xml (const ai_baset &ai, const namespacet &ns) const override
116103 {
117104 return value_set.output_xml ();
@@ -143,7 +130,9 @@ void value_set_domain_templatet<VST>::transform(
143130
144131 case END_FUNCTION:
145132 {
146- value_set.do_end_function (get_return_lhs (to_l), ns);
133+ locationt caller{to_l};
134+ --caller; // Unsafe in general but ai_baset should guarantee safety
135+ value_set.do_end_function (caller->call_lhs (), ns);
147136 break ;
148137 }
149138
You can’t perform that action at this time.
0 commit comments