diff --git a/infer/src/IR/Errlog.ml b/infer/src/IR/Errlog.ml index 68986444c..3c5171df2 100644 --- a/infer/src/IR/Errlog.ml +++ b/infer/src/IR/Errlog.ml @@ -119,8 +119,6 @@ end error description, severity, to set of err_data. *) type t = ErrDataSet.t ErrLogHash.t -let is_empty err_log = Int.equal 0 (ErrLogHash.length err_log) - (** Empty error log *) let empty () = ErrLogHash.create 13 diff --git a/infer/src/IR/Errlog.mli b/infer/src/IR/Errlog.mli index 09ecbd4c5..0c016c95d 100644 --- a/infer/src/IR/Errlog.mli +++ b/infer/src/IR/Errlog.mli @@ -63,8 +63,6 @@ type t val empty : unit -> t (** Empty error log *) -val is_empty : t -> bool - (** type of the function to be passed to iter *) type iter_fun = err_key -> err_data -> unit diff --git a/infer/src/IR/ProcAttributes.ml b/infer/src/IR/ProcAttributes.ml index d2827ebce..c9558bb0b 100644 --- a/infer/src/IR/ProcAttributes.ml +++ b/infer/src/IR/ProcAttributes.ml @@ -56,7 +56,6 @@ type t = { access: PredSymb.access (** visibility access *) ; captured: (Mangled.t * Typ.t) list (** name and type of variables captured in blocks *) ; mutable did_preanalysis: bool (** true if we performed preanalysis on the CFG for this proc *) - ; err_log: Errlog.t (** Error log for the procedure *) ; exceptions: string list (** exceptions thrown by the procedure *) ; formals: (Mangled.t * Typ.t) list (** name and type of formal parameters *) ; const_formals: int list (** list of indices of formals that are const-qualified *) @@ -86,7 +85,6 @@ let default translation_unit proc_name = { access= PredSymb.Default ; captured= [] ; did_preanalysis= false - ; err_log= Errlog.empty () ; exceptions= [] ; formals= [] ; const_formals= [] @@ -121,7 +119,6 @@ let pp f ({ access ; captured ; did_preanalysis - ; err_log ; exceptions ; formals ; const_formals @@ -157,8 +154,6 @@ let pp f if not ([%compare.equal : (Mangled.t * Typ.t) list] default.captured captured) then F.fprintf f "; captured= [@[%a@]]@," pp_parameters captured ; pp_bool_default ~default:default.did_preanalysis "did_preanalysis" did_preanalysis f () ; - if not (Errlog.is_empty err_log) then - F.fprintf f "; err_log= [@[%a%a@]]@," Errlog.pp_errors err_log Errlog.pp_warnings err_log ; if not ([%compare.equal : string list] default.exceptions exceptions) then F.fprintf f "; exceptions= [@[%a@]]@," (Pp.semicolon_seq ~print_env:Pp.text_break F.pp_print_string) diff --git a/infer/src/IR/ProcAttributes.mli b/infer/src/IR/ProcAttributes.mli index 0354443e0..260b4bacd 100644 --- a/infer/src/IR/ProcAttributes.mli +++ b/infer/src/IR/ProcAttributes.mli @@ -29,7 +29,6 @@ type t = { access: PredSymb.access (** visibility access *) ; captured: (Mangled.t * Typ.t) list (** name and type of variables captured in blocks *) ; mutable did_preanalysis: bool (** true if we performed preanalysis on the CFG for this proc *) - ; err_log: Errlog.t (** Error log for the procedure *) ; exceptions: string list (** exceptions thrown by the procedure *) ; formals: (Mangled.t * Typ.t) list (** name and type of formal parameters *) ; const_formals: int list (** list of indices of formals that are const-qualified *) diff --git a/infer/src/IR/Procdesc.ml b/infer/src/IR/Procdesc.ml index 140f68c32..1c179ded3 100644 --- a/infer/src/IR/Procdesc.ml +++ b/infer/src/IR/Procdesc.ml @@ -847,7 +847,6 @@ let specialize_types ?(has_clang_model= false) callee_pdesc resolved_pname args formals= List.rev resolved_params ; proc_name= resolved_pname ; is_specialized= true - ; err_log= Errlog.empty () ; translation_unit } in Attributes.store resolved_attributes ; @@ -1004,7 +1003,6 @@ let specialize_with_block_args callee_pdesc pname_with_block_args block_args = { callee_attributes with proc_name= pname_with_block_args ; is_defined= true - ; err_log= Errlog.empty () ; formals= new_formals_blocks_captured_vars ; method_annotation= (fst callee_attributes.method_annotation, extended_formals_annots) ; translation_unit } diff --git a/infer/src/backend/Summary.ml b/infer/src/backend/Summary.ml index 32887a6c6..a2f0793be 100644 --- a/infer/src/backend/Summary.ml +++ b/infer/src/backend/Summary.ml @@ -73,7 +73,12 @@ module Status = struct end type t = - {payloads: Payloads.t; sessions: int ref; stats: Stats.t; status: Status.t; proc_desc: Procdesc.t} + { payloads: Payloads.t + ; sessions: int ref + ; stats: Stats.t + ; status: Status.t + ; proc_desc: Procdesc.t + ; err_log: Errlog.t } let get_status summary = summary.status @@ -87,7 +92,7 @@ let get_ret_type summary = (get_attributes summary).ProcAttributes.ret_type let get_formals summary = (get_attributes summary).ProcAttributes.formals -let get_err_log summary = (get_attributes summary).ProcAttributes.err_log +let get_err_log summary = summary.err_log let get_loc summary = (get_attributes summary).ProcAttributes.loc @@ -239,7 +244,8 @@ let init_summary proc_desc = ; payloads= Payloads.empty ; stats= Stats.empty ; status= Status.Pending - ; proc_desc } + ; proc_desc + ; err_log= Errlog.empty () } in Typ.Procname.Hash.replace cache (Procdesc.get_proc_name proc_desc) summary ; summary diff --git a/infer/src/backend/Summary.mli b/infer/src/backend/Summary.mli index 01adaa73f..1108d98c5 100644 --- a/infer/src/backend/Summary.mli +++ b/infer/src/backend/Summary.mli @@ -49,7 +49,8 @@ type t = ; sessions: int ref (** Session number: how many nodes went through symbolic execution *) ; stats: Stats.t ; status: Status.t - ; proc_desc: Procdesc.t } + ; proc_desc: Procdesc.t + ; err_log: Errlog.t } val dummy : t (** dummy summary for testing *)