diff --git a/infer/src/backend/Differential.mli b/infer/src/backend/Differential.mli index 383673f77..3ab55d0df 100644 --- a/infer/src/backend/Differential.mli +++ b/infer/src/backend/Differential.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + type t = { introduced : Jsonbug_t.report; fixed : Jsonbug_t.report; diff --git a/infer/src/backend/DifferentialFilters.mli b/infer/src/backend/DifferentialFilters.mli index 4e279add7..ab08a9e5e 100644 --- a/infer/src/backend/DifferentialFilters.mli +++ b/infer/src/backend/DifferentialFilters.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + module FileRenamings : sig type renaming = { diff --git a/infer/src/base/MarkupFormatter.mli b/infer/src/base/MarkupFormatter.mli index 432e0f0ee..ecdf5c3d7 100644 --- a/infer/src/base/MarkupFormatter.mli +++ b/infer/src/base/MarkupFormatter.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + (** used to combine pp together, wrap content into a monospaced block *) val wrap_monospaced : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a -> unit diff --git a/infer/src/base/SourceFile.mli b/infer/src/base/SourceFile.mli index eb21d2f30..58db4c4ad 100644 --- a/infer/src/base/SourceFile.mli +++ b/infer/src/base/SourceFile.mli @@ -7,13 +7,15 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + type t [@@deriving compare] (** Maps from source_file *) -module Map : Map.S with type key = t +module Map : Caml.Map.S with type key = t (** Set of source files *) -module Set : Set.S with type elt = t +module Set : Caml.Set.S with type elt = t module UNSAFE : sig (** Create a SourceFile from any path. This is unchecked and should not be diff --git a/infer/src/bufferoverrun/absLoc.ml b/infer/src/bufferoverrun/absLoc.ml index 801a0a280..08e65d224 100644 --- a/infer/src/bufferoverrun/absLoc.ml +++ b/infer/src/bufferoverrun/absLoc.ml @@ -10,6 +10,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + module F = Format module Allocsite = @@ -33,8 +35,8 @@ struct | Var v -> Var.pp F.str_formatter v; let s = F.flush_str_formatter () in - if s.[0] = '&' then - F.fprintf fmt "%s" (String.sub s 1 (String.length s - 1)) + if Char.equal s.[0] '&' then + F.fprintf fmt "%s" (String.sub s ~pos:1 ~len:(String.length s - 1)) else F.fprintf fmt "%s" s | Allocsite a -> Allocsite.pp fmt a | Field (l, f) -> F.fprintf fmt "%a.%a" pp l Fieldname.pp f diff --git a/infer/src/bufferoverrun/bufferOverrunChecker.mli b/infer/src/bufferoverrun/bufferOverrunChecker.mli index d6c90bc25..5b1dbca2a 100644 --- a/infer/src/bufferoverrun/bufferOverrunChecker.mli +++ b/infer/src/bufferoverrun/bufferOverrunChecker.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + val checker : Callbacks.proc_callback_t diff --git a/infer/src/checkers/AnnotReachabilityDomain.ml b/infer/src/checkers/AnnotReachabilityDomain.ml index 46de520df..38e70f6cf 100644 --- a/infer/src/checkers/AnnotReachabilityDomain.ml +++ b/infer/src/checkers/AnnotReachabilityDomain.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + module CallSites = AbstractDomain.FiniteSet (CallSite) module SinkMap = AbstractDomain.Map (Typ.Procname) (CallSites) diff --git a/infer/src/checkers/NullabilityPreanalysis.mli b/infer/src/checkers/NullabilityPreanalysis.mli index 9637d86de..e9193d3c7 100644 --- a/infer/src/checkers/NullabilityPreanalysis.mli +++ b/infer/src/checkers/NullabilityPreanalysis.mli @@ -9,5 +9,7 @@ (* Module that define preanalysis to derive nullability annotations *) +open! IStd + (* Analysis the cfg and updates the tenv with nullability annotations *) val analysis : Cfg.cfg -> Tenv.t -> unit diff --git a/infer/src/checkers/ThreadSafety.mli b/infer/src/checkers/ThreadSafety.mli index b6c55556b..0618127d0 100644 --- a/infer/src/checkers/ThreadSafety.mli +++ b/infer/src/checkers/ThreadSafety.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + val file_analysis : Callbacks.cluster_callback_t val analyze_procedure : Callbacks.proc_callback_t diff --git a/infer/src/checkers/accessTree.mli b/infer/src/checkers/accessTree.mli index 236e0ed3f..a77b1a251 100644 --- a/infer/src/checkers/accessTree.mli +++ b/infer/src/checkers/accessTree.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + (** tree of (trace, access path) associations organized by structure of access paths *) module type S = sig module TraceDomain : AbstractDomain.WithBottom diff --git a/infer/src/checkers/annotationReachability.mli b/infer/src/checkers/annotationReachability.mli index d6c90bc25..5b1dbca2a 100644 --- a/infer/src/checkers/annotationReachability.mli +++ b/infer/src/checkers/annotationReachability.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + val checker : Callbacks.proc_callback_t diff --git a/infer/src/checkers/fragmentRetainsViewChecker.mli b/infer/src/checkers/fragmentRetainsViewChecker.mli index be460c701..fe5a176b2 100644 --- a/infer/src/checkers/fragmentRetainsViewChecker.mli +++ b/infer/src/checkers/fragmentRetainsViewChecker.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + val callback_fragment_retains_view : Callbacks.proc_callback_t diff --git a/infer/src/checkers/summary.mli b/infer/src/checkers/summary.mli index c384b8643..9fc5e4294 100644 --- a/infer/src/checkers/summary.mli +++ b/infer/src/checkers/summary.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + module type Payload = sig type payload diff --git a/infer/src/clang/CiOSVersionNumbers.mli b/infer/src/clang/CiOSVersionNumbers.mli index ed56352fa..bd7bab2c6 100644 --- a/infer/src/clang/CiOSVersionNumbers.mli +++ b/infer/src/clang/CiOSVersionNumbers.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + type machine_readable_version = float type human_readable_version = string type t = machine_readable_version * human_readable_version diff --git a/infer/src/clang/ctl_lexer.mll b/infer/src/clang/ctl_lexer.mll index ab1d7f3ef..5584d1275 100644 --- a/infer/src/clang/ctl_lexer.mll +++ b/infer/src/clang/ctl_lexer.mll @@ -8,6 +8,8 @@ *) { + open! IStd + open Lexing open Ctl_parser diff --git a/infer/src/clang/ctl_parser.mly b/infer/src/clang/ctl_parser.mly index 250bfe261..a4d2b12df 100644 --- a/infer/src/clang/ctl_parser.mly +++ b/infer/src/clang/ctl_parser.mly @@ -9,6 +9,8 @@ %{ + open! IStd + let formal_params : (ALVar.t list) ref = ref [] let is_not_infer_reserved_id id = @@ -19,7 +21,7 @@ else () let is_defined_identifier id = - if (List.mem (ALVar.Var id) !formal_params) then + if (List.mem ~equal:ALVar.equal !formal_params (ALVar.Var id)) then Logging.out "\tParsed exp '%s' as variable" id else raise (Ctl_parser_types.ALParsingException @@ -149,7 +151,7 @@ clause: | "severity" -> ALVar.Severity | "mode" -> ALVar.Mode | "path" -> ALVar.Path - | _ -> IStd.failwithf "[ERROR] string '%s' cannot be set in a SET clause. \ + | _ -> failwithf "[ERROR] string '%s' cannot be set in a SET clause. \ Use either of: \ 'message', 'mode', 'severity', 'suggestion' or 'path'" $2 in CTL.CDesc (alvar, $4) } diff --git a/infer/src/clang/ctl_parser_types.mli b/infer/src/clang/ctl_parser_types.mli index 68ac935aa..024e425d2 100644 --- a/infer/src/clang/ctl_parser_types.mli +++ b/infer/src/clang/ctl_parser_types.mli @@ -9,6 +9,8 @@ (* Types used by the ctl parser *) +open! IStd + (** the kind of AST nodes where formulas are evaluated *) type ast_node = | Stmt of Clang_ast_t.stmt diff --git a/infer/src/clang/types_lexer.mll b/infer/src/clang/types_lexer.mll index ef1749fb3..23f5407fc 100644 --- a/infer/src/clang/types_lexer.mll +++ b/infer/src/clang/types_lexer.mll @@ -8,6 +8,8 @@ *) { + open! IStd + open Lexing open Types_parser diff --git a/infer/src/clang/types_parser.mly b/infer/src/clang/types_parser.mly index 6d28757a8..72e71c8fe 100644 --- a/infer/src/clang/types_parser.mly +++ b/infer/src/clang/types_parser.mly @@ -8,6 +8,8 @@ */ %{ + open! IStd + open Ctl_parser_types (* See StringRef BuiltinType::getName in diff --git a/infer/src/clang_stubs/ClangWrapper.ml b/infer/src/clang_stubs/ClangWrapper.ml index 61a8714bb..c87f9a511 100644 --- a/infer/src/clang_stubs/ClangWrapper.ml +++ b/infer/src/clang_stubs/ClangWrapper.ml @@ -6,4 +6,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. *) + +open! IStd + let exe ~prog:_ ~args:_ = () diff --git a/infer/src/eradicate/AnnotatedSignature.mli b/infer/src/eradicate/AnnotatedSignature.mli index 4ca07f98f..b3566ea8b 100644 --- a/infer/src/eradicate/AnnotatedSignature.mli +++ b/infer/src/eradicate/AnnotatedSignature.mli @@ -7,9 +7,10 @@ * of patent rights can be found in the PATENTS file in the same directory. *) - (** Method signature with annotations. *) +open! IStd + type t = { ret : Annot.Item.t * Typ.t; (** Annotated return type. *) params: (Mangled.t * Annot.Item.t * Typ.t) list; (** Annotated parameters. *) diff --git a/infer/src/integration/Buck.mli b/infer/src/integration/Buck.mli index ff2b5f5e7..34d03dccc 100644 --- a/infer/src/integration/Buck.mli +++ b/infer/src/integration/Buck.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + (** is this a Buck target string, eg //foo/bar:baz or boo//foo/bar:baz *) val is_target_string : string -> bool diff --git a/infer/src/integration/Maven.mli b/infer/src/integration/Maven.mli index 720607aaf..e9cbfe159 100644 --- a/infer/src/integration/Maven.mli +++ b/infer/src/integration/Maven.mli @@ -6,4 +6,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. *) + +open! IStd + val capture : prog:string -> args:string list -> unit diff --git a/infer/src/java_stubs/jMain.ml b/infer/src/java_stubs/jMain.ml index 369e2c6e1..908e49e31 100644 --- a/infer/src/java_stubs/jMain.ml +++ b/infer/src/java_stubs/jMain.ml @@ -7,5 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + let from_arguments _ = () let from_verbose_out _ = () diff --git a/infer/src/opensource/GraphQL.ml b/infer/src/opensource/GraphQL.ml index f31cb62ab..9438c6ada 100644 --- a/infer/src/opensource/GraphQL.ml +++ b/infer/src/opensource/GraphQL.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + module DeprecatedAPIUsage = struct let checker _ _ = None end diff --git a/infer/src/opensource/GraphQL.mli b/infer/src/opensource/GraphQL.mli index 2875f8f69..483ecdbe7 100644 --- a/infer/src/opensource/GraphQL.mli +++ b/infer/src/opensource/GraphQL.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + module DeprecatedAPIUsage : sig val checker : diff --git a/infer/src/quandary/ClangTaintAnalysis.mli b/infer/src/quandary/ClangTaintAnalysis.mli index d6c90bc25..5b1dbca2a 100644 --- a/infer/src/quandary/ClangTaintAnalysis.mli +++ b/infer/src/quandary/ClangTaintAnalysis.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + val checker : Callbacks.proc_callback_t diff --git a/infer/src/quandary/JavaTaintAnalysis.mli b/infer/src/quandary/JavaTaintAnalysis.mli index d6c90bc25..5b1dbca2a 100644 --- a/infer/src/quandary/JavaTaintAnalysis.mli +++ b/infer/src/quandary/JavaTaintAnalysis.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + val checker : Callbacks.proc_callback_t diff --git a/infer/src/unit/accessPathTestUtils.mli b/infer/src/unit/accessPathTestUtils.mli index b36fa8d6d..e9aced43b 100644 --- a/infer/src/unit/accessPathTestUtils.mli +++ b/infer/src/unit/accessPathTestUtils.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! IStd + val make_var : string -> Pvar.t val make_fieldname : string -> Fieldname.t