Summary: The analysis call graph is the call graph from the perspective of the analyses run in infer This commit creates the reverse analysis call graph to be used for incremental diff analysis Reviewed By: ezgicicek Differential Revision: D16335938 fbshipit-source-id: 0cbab3298master
parent
578b1c95f1
commit
9be3af16ac
@ -0,0 +1,17 @@
|
||||
(*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
open! IStd
|
||||
|
||||
let register_summary graph summary =
|
||||
let caller_pname = Summary.get_proc_name summary in
|
||||
let callee_pnames = summary.Summary.callee_pnames in
|
||||
Typ.Procname.Set.iter
|
||||
(fun callee_pname -> CallGraph.add_edge graph ~pname:callee_pname ~successor_pname:caller_pname)
|
||||
callee_pnames
|
||||
|
||||
|
||||
let build graph = SpecsFiles.iter ~f:(register_summary graph)
|
@ -0,0 +1,12 @@
|
||||
(*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
open! IStd
|
||||
|
||||
(* Suppress unused value warning until this is used for incremental diff analysis *)
|
||||
val build : CallGraph.t -> unit
|
||||
[@@warning "-32"]
|
||||
(** Build the graph from the summaries in the .specs files *)
|
Loading…
Reference in new issue