Skip to content

Commit

Permalink
[pulse][refactor] removing a redundant parameter
Browse files Browse the repository at this point in the history
Summary: let's simplify this parameter passing

Reviewed By: geralt-encore

Differential Revision:
D52874096

Privacy Context Container: L1208441

fbshipit-source-id: 72c1cbfd9b61443c139d95774629236860b42684
  • Loading branch information
davidpichardie authored and facebook-github-bot committed Jan 18, 2024
1 parent a31d9f7 commit 05d759a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions infer/src/pulse/Pulse.ml
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ module PulseTransferFunctions = struct
None


let find_override exe_env tenv astate receiver proc_name proc_name_opt =
let find_override exe_env tenv astate receiver proc_name =
let tenv_resolve_method tenv type_name proc_name =
let method_exists proc_name methods = List.mem ~equal:Procname.equal methods proc_name in
Tenv.resolve_method ~method_exists tenv type_name proc_name
Expand Down Expand Up @@ -423,7 +423,7 @@ module PulseTransferFunctions = struct
static resolution so we have to do it here *)
let* type_name = Procname.get_class_type_name proc_name in
tenv_resolve_method tenv type_name proc_name
else Option.map ~f:Tenv.MethodInfo.mk_class proc_name_opt
else Some (Tenv.MethodInfo.mk_class proc_name)
in
(proc_name, `ApproxDevirtualization)

Expand All @@ -439,7 +439,7 @@ module PulseTransferFunctions = struct

let resolve_virtual_call exe_env tenv astate receiver proc_name_opt =
Option.map proc_name_opt ~f:(fun proc_name ->
match find_override exe_env tenv astate receiver proc_name proc_name_opt with
match find_override exe_env tenv astate receiver proc_name with
| Some (info, devirtualization_status) ->
let proc_name' = Tenv.MethodInfo.get_procname info in
L.d_printfln "Dynamic dispatch: %a %s resolved to %a" Procname.pp_verbose proc_name
Expand Down

0 comments on commit 05d759a

Please sign in to comment.