@ -665,8 +665,8 @@ let rec check_condition_for_sil_prune tenv idenv calls_this find_canonical_dupli
| _ ->
| _ ->
None
None
in
in
(* check if the expression is coming from ( `a` instanceof `b` ) , and returns ` b `, if it is the case *)
(* check if the expression is coming from ( `a` instanceof `b` ) , and returns ` a `, if it is the case *)
let extract_ argument_from_instanceof expr =
let extract_ first_ argument_from_instanceof expr =
match extract_arguments_from_call ComplexExpressions . procname_instanceof expr with
match extract_arguments_from_call ComplexExpressions . procname_instanceof expr with
| Some [ argument ; _ ] ->
| Some [ argument ; _ ] ->
Some argument
Some argument
@ -805,9 +805,9 @@ let rec check_condition_for_sil_prune tenv idenv calls_this find_canonical_dupli
accumulated_typestate )
accumulated_typestate )
arguments
arguments
| None -> (
| None -> (
match extract_ argument_from_instanceof expr with
match extract_ first_ argument_from_instanceof expr with
| Some argument ->
| Some argument ->
(* ( [argument] instanceof [expr] == true) implies ( expr != null) *)
(* ( [argument] instanceof <anything> == true) implies ( argument != null) *)
set_original_pvar_to_nonnull_in_typestate ~ with_cond_redundant_check : false argument
set_original_pvar_to_nonnull_in_typestate ~ with_cond_redundant_check : false argument
typestate
typestate
| None ->
| None ->