[infer][ondemand] use the attributes from the procedure description without filesystem lookup

Summary: The procedure description is available when initializing the analysis summary, so it is simpler to use it than to rely on loading the data from the attributes.

Reviewed By: jvillard

Differential Revision: D5027049

fbshipit-source-id: 92cac5c
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent c6a29e5e8a
commit be0cd4fa73

@ -135,13 +135,7 @@ let run_proc_analysis ~propagate_exceptions analyze_proc curr_pdesc callee_pdesc
let preprocess () =
incr nesting;
let attributes_opt =
Specs.proc_resolve_attributes callee_pname in
let callee_pdesc_option =
if Config.dynamic_dispatch = `Lazy
then Some callee_pdesc
else None in
let initial_summary = Specs.reset_summary callee_pname attributes_opt callee_pdesc_option in
let initial_summary = Specs.reset_summary callee_pdesc in
add_active callee_pname;
initial_summary in

@ -722,21 +722,16 @@ let dummy =
)
(** Reset a summary rebuilding the dependents and preserving the proc attributes if present. *)
let reset_summary proc_name attributes_opt proc_desc_option =
let proc_attributes = match attributes_opt with
| Some attributes ->
attributes
| None ->
begin
match proc_desc_option with
| Some proc_desc -> Procdesc.get_attributes proc_desc
| None -> ProcAttributes.default proc_name !Config.curr_language
end in
let reset_summary proc_desc =
let proc_desc_option =
if Config.dynamic_dispatch = `Lazy
then Some proc_desc
else None in
init_summary (
[],
ProcAttributes.proc_flags_empty (),
[],
proc_attributes,
Procdesc.get_attributes proc_desc,
proc_desc_option
)

@ -213,7 +213,7 @@ val init_summary :
-> summary
(** Reset a summary rebuilding the dependents and preserving the proc attributes if present. *)
val reset_summary : Typ.Procname.t -> ProcAttributes.t option -> Procdesc.t option -> summary
val reset_summary : Procdesc.t -> summary
(** Load procedure summary from the given file *)
val load_summary : DB.filename -> summary option

Loading…
Cancel
Save