Skip to content

Commit bff4091

Browse files
committed
Remove shadowing local "se"
The temporary does not add to readability, just inline the call.
1 parent a6ba5d1 commit bff4091

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/goto-programs/replace_calls.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,12 @@ void replace_callst::operator()(
103103
const code_assignt &ca = to_code_assign(next_it->code);
104104
const exprt &rhs = ca.rhs();
105105

106-
if(rhs.id() == ID_symbol)
107-
{
108-
const symbol_exprt &se = to_symbol_expr(rhs);
109-
INVARIANT(
110-
!has_suffix(id2string(se.get_identifier()), RETURN_VALUE_SUFFIX),
111-
"returns must not be removed before replacing calls");
112-
}
106+
INVARIANT(
107+
rhs.id() != ID_symbol ||
108+
!has_suffix(
109+
id2string(to_symbol_expr(rhs).get_identifier()),
110+
RETURN_VALUE_SUFFIX),
111+
"returns must not be removed before replacing calls");
113112
}
114113

115114
// Finally modify the call

0 commit comments

Comments
 (0)