Skip to content

Commit f41505b

Browse files
tautschnigsmowton
authored andcommitted
mode!=ID_java is trivially true in this branch
This is part of the else { ... } in if(mode==ID_java) { ... } else { ... }
1 parent 0f53d14 commit f41505b

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

src/analyses/goto_check.cpp

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,26 +1029,23 @@ void goto_checkt::pointer_validity_check(
10291029
expr,
10301030
guard);
10311031

1032-
if(mode != ID_java)
1033-
{
1034-
if(flags.is_unknown() || flags.is_dynamic_heap())
1035-
add_guarded_claim(
1036-
not_exprt(deallocated(pointer, ns)),
1037-
"dereference failure: deallocated dynamic object",
1038-
"pointer dereference",
1039-
expr.find_source_location(),
1040-
expr,
1041-
guard);
1032+
if(flags.is_unknown() || flags.is_dynamic_heap())
1033+
add_guarded_claim(
1034+
not_exprt(deallocated(pointer, ns)),
1035+
"dereference failure: deallocated dynamic object",
1036+
"pointer dereference",
1037+
expr.find_source_location(),
1038+
expr,
1039+
guard);
10421040

1043-
if(flags.is_unknown() || flags.is_dynamic_local())
1044-
add_guarded_claim(
1045-
not_exprt(dead_object(pointer, ns)),
1046-
"dereference failure: dead object",
1047-
"pointer dereference",
1048-
expr.find_source_location(),
1049-
expr,
1050-
guard);
1051-
}
1041+
if(flags.is_unknown() || flags.is_dynamic_local())
1042+
add_guarded_claim(
1043+
not_exprt(dead_object(pointer, ns)),
1044+
"dereference failure: dead object",
1045+
"pointer dereference",
1046+
expr.find_source_location(),
1047+
expr,
1048+
guard);
10521049

10531050
if(enable_bounds_check)
10541051
{

0 commit comments

Comments
 (0)