From 8cee4fefd5bf9dcce95e164ddebbe7ddf8834c47 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 5 Sep 2017 18:35:39 -0700 Subject: [PATCH] [infer][biabduction] remove unused skip flag Summary: This does not seem to be used Reviewed By: sblackshear Differential Revision: D5771578 fbshipit-source-id: e889f86 --- infer/src/IR/ProcAttributes.ml | 2 -- infer/src/IR/ProcAttributes.mli | 3 --- infer/src/backend/specs.ml | 6 ------ infer/src/backend/specs.mli | 3 --- infer/src/backend/symExec.ml | 4 +--- 5 files changed, 1 insertion(+), 17 deletions(-) diff --git a/infer/src/IR/ProcAttributes.ml b/infer/src/IR/ProcAttributes.ml index 38a38eb17..40178399c 100644 --- a/infer/src/IR/ProcAttributes.ml +++ b/infer/src/IR/ProcAttributes.ml @@ -23,8 +23,6 @@ let compare_proc_flags x y = let proc_flags_empty () : proc_flags = Hashtbl.create 1 -let proc_flag_skip = "skip" - let proc_flag_ignore_return = "ignore_return" let proc_flags_add proc_flags key value = Hashtbl.replace proc_flags key value diff --git a/infer/src/IR/ProcAttributes.mli b/infer/src/IR/ProcAttributes.mli index d2cdea511..66896e23e 100644 --- a/infer/src/IR/ProcAttributes.mli +++ b/infer/src/IR/ProcAttributes.mli @@ -14,9 +14,6 @@ open! IStd (** flags for a procedure *) type proc_flags = (string, string) Caml.Hashtbl.t [@@deriving compare] -val proc_flag_skip : string -(** keys for proc_flags *) - val proc_flag_ignore_return : string (** key to specify that a function should be treated as a skip function *) diff --git a/infer/src/backend/specs.ml b/infer/src/backend/specs.ml index e72765a6b..22644b468 100644 --- a/infer/src/backend/specs.ml +++ b/infer/src/backend/specs.ml @@ -668,12 +668,6 @@ let get_formals summary = summary.attributes.ProcAttributes.formals let get_attributes summary = summary.attributes -(** Get the flag with the given key for the procedure, if any *) -let get_flag summary key = - let proc_flags = summary.attributes.ProcAttributes.proc_flags in - try Some (Hashtbl.find proc_flags key) - with Not_found -> None - (** Return the current phase for the proc *) let get_phase summary = summary.phase diff --git a/infer/src/backend/specs.mli b/infer/src/backend/specs.mli index 2e522943e..061ec8b9d 100644 --- a/infer/src/backend/specs.mli +++ b/infer/src/backend/specs.mli @@ -180,9 +180,6 @@ val get_ret_type : summary -> Typ.t val get_formals : summary -> (Mangled.t * Typ.t) list (** Get the formal paramters of the procedure *) -val get_flag : summary -> string -> string option -(** Get the flag with the given key for the procedure, if any *) - val get_phase : summary -> phase (** Return the current phase for the proc *) diff --git a/infer/src/backend/symExec.ml b/infer/src/backend/symExec.ml index a84a332f0..c8e2c7ac5 100644 --- a/infer/src/backend/symExec.ml +++ b/infer/src/backend/symExec.ml @@ -399,10 +399,8 @@ let check_inherently_dangerous_function caller_pname callee_pname = Reporting.log_warning_deprecated caller_pname exn let call_should_be_skipped callee_summary = - (* check skip flag *) - Specs.get_flag callee_summary ProcAttributes.proc_flag_skip <> None (* skip abstract methods *) - || callee_summary.Specs.attributes.ProcAttributes.is_abstract + callee_summary.Specs.attributes.ProcAttributes.is_abstract (* treat calls with no specs as skip functions in angelic mode *) || Config.angelic_execution && List.is_empty (Specs.get_specs_from_payload callee_summary)