[starvation] use capture attributes instead of preanalysed ones

Summary: As per title.

Reviewed By: ezgicicek

Differential Revision: D30192614

fbshipit-source-id: 6401876c3
master
Nikos Gorogiannis 3 years ago committed by Facebook GitHub Bot
parent 2d49f4b7ad
commit 7bbfb81706

@ -831,11 +831,14 @@ let reporting {InterproceduralAnalysis.procedures; file_exe_env; analyze_file_de
payload report_map
in
let report_procedure report_map procname =
analyze_file_dependency procname
|> Option.value_map ~default:report_map ~f:(fun (proc_desc, summary) ->
let attributes = Procdesc.get_attributes proc_desc in
let tenv = Exe_env.get_proc_tenv file_exe_env procname in
if should_report attributes then report_on_proc tenv attributes report_map summary
else report_map )
match Attributes.load procname with
| None ->
report_map
| Some attributes ->
analyze_file_dependency procname
|> Option.value_map ~default:report_map ~f:(fun (_proc_desc, summary) ->
let tenv = Exe_env.get_proc_tenv file_exe_env procname in
if should_report attributes then report_on_proc tenv attributes report_map summary
else report_map )
in
List.fold procedures ~init:ReportMap.empty ~f:report_procedure |> ReportMap.issue_log_of

Loading…
Cancel
Save