Module Absint.Localise

Support for localisation

module Tags : sig ... end
type error_desc = {
  1. descriptions : string list;
  2. suggestion : string option;
  3. tags : Tags.t;
  4. dotty : string option;
}

description field of error messages

val compare_error_desc : error_desc -> error_desc -> int
val no_desc : error_desc

empty error description

val verbatim_desc : ?suggestion:string -> string -> error_desc

verbatim desc from a string and suggestion, not to be used for user-visible descs

module BucketLevel : sig ... end
val error_desc_get_bucket : error_desc -> string option

get the bucket value of an error_desc, if any

val error_desc_set_bucket : error_desc -> string -> error_desc

set the bucket value of an error_desc

val error_desc_is_reportable_bucket : error_desc -> bool

check if the report is in a high confidence bucket

val error_desc_hash : error_desc -> int

hash function for error_desc

val error_desc_equal : error_desc -> error_desc -> bool

equality for error_desc

val pp_error_qualifier : Stdlib.Format.formatter -> error_desc -> unit

pretty print an error qualifier

val pp_error_desc : Stdlib.Format.formatter -> error_desc -> unit

pretty print a full error description with suggestion

val error_desc_get_dotty : error_desc -> string option

Description functions for error messages

type deref_str

dereference strings used to explain a dereference action in an error message

val deref_str_null : IR.Procname.t option -> deref_str

dereference strings for null dereference

val deref_str_nullable : IR.Procname.t option -> string -> deref_str

dereference strings for null dereference due to Nullable annotation

val deref_str_undef : (IR.Procname.t * IBase.Location.t) -> deref_str

dereference strings for an undefined value coming from the given procedure

val deref_str_dangling : IR.PredSymb.dangling_kind option -> deref_str

dereference strings for a dangling pointer dereference

val deref_str_array_bound : IR.IntLit.t option -> IR.IntLit.t option -> deref_str

dereference strings for an array out of bound access

val deref_str_nil_argument_in_variadic_method : IR.Procname.t -> int -> int -> deref_str

dereference strings for nonterminal nil arguments in c/objc variadic methods

type access =
  1. | Last_assigned of int * bool
    (*

    line, null_case_flag

    *)
  2. | Last_accessed of int * bool
    (*

    line, is_nullable flag

    *)
  3. | Initialized_automatically
  4. | Returned_from_call of int

type of access

val dereference_string : IR.Procname.t -> deref_str -> string -> access option -> IBase.Location.t -> error_desc
val desc_class_cast_exception : IR.Procname.t option -> string -> string -> string option -> IBase.Location.t -> error_desc
val desc_condition_always_true_false : IR.IntLit.t -> string option -> IBase.Location.t -> error_desc
val desc_divide_by_zero : string -> IBase.Location.t -> error_desc
val desc_empty_vector_access : IR.Procname.t option -> string -> IBase.Location.t -> error_desc
val is_empty_vector_access_desc : error_desc -> bool
val desc_leak : IR.Exp.t option -> string option -> IR.PredSymb.resource option -> IR.PredSymb.res_action option -> IBase.Location.t -> string option -> error_desc
val desc_custom_error : IBase.Location.t -> error_desc

Create human-readable error description for assertion failures

type pnm_kind =
  1. | Pnm_bounds
  2. | Pnm_dangling

kind of precondition not met

val desc_precondition_not_met : pnm_kind option -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_retain_cycle : string -> IBase.Location.t -> string option -> error_desc
val desc_registered_observer_being_deallocated : IR.Pvar.t -> IBase.Location.t -> error_desc
val desc_skip_function : IR.Procname.t -> error_desc
val desc_inherently_dangerous_function : IR.Procname.t -> error_desc
val desc_uninitialized_dangling_pointer_deref : deref_str -> string -> IBase.Location.t -> error_desc
val access_desc : access option -> string list