Skip to content

Commit e2ca274

Browse files
author
Daniel Kroening
authored
Merge pull request #3350 from tautschnig/vs-shadow-3
Rename non-descriptive class member t to current_target [blocks: #2310]
2 parents 17e3714 + c7c1acc commit e2ca274

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/analyses/goto_check.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class goto_checkt
8080
protected:
8181
const namespacet &ns;
8282
std::unique_ptr<local_bitvector_analysist> local_bitvector_analysis;
83-
goto_programt::const_targett t;
83+
goto_programt::const_targett current_target;
8484

8585
void check_rec(
8686
const exprt &expr,
@@ -289,11 +289,8 @@ void goto_checkt::undefined_shift_check(
289289
if(width_expr.is_nil())
290290
throw "no number for width for operator "+expr.id_string();
291291

292-
binary_relation_exprt inequality(
293-
expr.distance(), ID_lt, width_expr);
294-
295292
add_guarded_claim(
296-
inequality,
293+
binary_relation_exprt(expr.distance(), ID_lt, width_expr),
297294
"shift distance too large",
298295
"undefined-shift",
299296
expr.find_source_location(),
@@ -965,7 +962,7 @@ goto_checkt::address_check(const exprt &address, const exprt &size)
965962
const auto &pointer_type = to_pointer_type(address.type());
966963

967964
local_bitvector_analysist::flagst flags =
968-
local_bitvector_analysis->get(t, address);
965+
local_bitvector_analysis->get(current_target, address);
969966

970967
// For Java, we only need to check for null
971968
if(mode == ID_java)
@@ -1535,7 +1532,7 @@ void goto_checkt::goto_check(
15351532

15361533
Forall_goto_program_instructions(it, goto_program)
15371534
{
1538-
t=it;
1535+
current_target = it;
15391536
goto_programt::instructiont &i=*it;
15401537

15411538
new_code.clear();
@@ -1606,8 +1603,8 @@ void goto_checkt::goto_check(
16061603
{
16071604
exprt pointer=code_function_call.arguments()[0];
16081605

1609-
local_bitvector_analysist::flagst flags=
1610-
local_bitvector_analysis->get(t, pointer);
1606+
local_bitvector_analysist::flagst flags =
1607+
local_bitvector_analysis->get(current_target, pointer);
16111608

16121609
if(flags.is_unknown() || flags.is_null())
16131610
{

0 commit comments

Comments
 (0)