Skip to content

Commit 6473900

Browse files
committed
Disable notify_static_method_calls path for side_effect_expr_function_callt
This is currently dead code, so replace it with an invariant describing the situation.
1 parent 85405bb commit 6473900

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

jbmc/src/java_bytecode/java_bytecode_language.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,16 @@ static void notify_static_method_calls(
12411241
const symbol_exprt *fn_sym =
12421242
expr_try_dynamic_cast<symbol_exprt>(call_expr.function());
12431243
if(fn_sym)
1244-
needed_lazy_methods->add_needed_method(fn_sym->get_identifier());
1244+
{
1245+
INVARIANT(
1246+
false,
1247+
"Java synthetic methods are not "
1248+
"expected to produce side_effect_expr_function_callt. If "
1249+
"that has changed, remove this invariant. Also note that "
1250+
"as of the time of writing remove_virtual_functions did "
1251+
"not support this form of function call.");
1252+
// needed_lazy_methods->add_needed_method(fn_sym->get_identifier());
1253+
}
12451254
}
12461255
}
12471256
}

0 commit comments

Comments
 (0)