From a11791d5fc0f8d078c1fa2452c21385879511c11 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 4 May 2020 08:13:47 -0700 Subject: [PATCH] [nullsafe] the analysis should not depend on inter-procedural summaries Summary: Load proc descs without potentially triggering an inter-procedural analysis (scary!). Reviewed By: dulmarod, mityal Differential Revision: D21351457 fbshipit-source-id: 5ec369fe5 --- infer/src/nullsafe/Initializers.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/infer/src/nullsafe/Initializers.ml b/infer/src/nullsafe/Initializers.ml index 76b1c0b26..a4ed9efe0 100644 --- a/infer/src/nullsafe/Initializers.ml +++ b/infer/src/nullsafe/Initializers.ml @@ -36,7 +36,7 @@ let final_typestates initializers_current_class tenv typecheck_proc = PatternMatch.proc_calls (PatternMatch.lookup_attributes tenv) init_pd filter in let do_called (callee_pn, _) = - match Ondemand.get_proc_desc callee_pn with + match Procdesc.load callee_pn with | Some callee_pd -> res := (callee_pn, callee_pd) :: !res | None -> @@ -90,11 +90,7 @@ let pname_and_pdescs_with tenv curr_pname f = in let do_proc pname = if filter pname then - match Ondemand.get_proc_desc pname with - | Some pdesc -> - res := (pname, pdesc) :: !res - | None -> - () + match Procdesc.load pname with Some pdesc -> res := (pname, pdesc) :: !res | None -> () in List.iter ~f:do_proc (SourceFiles.get_procs_in_file curr_pname) ; List.rev !res