diff --git a/infer/src/IR/Exp.ml b/infer/src/IR/Exp.ml index fac0bc921..7c6cc5486 100644 --- a/infer/src/IR/Exp.ml +++ b/infer/src/IR/Exp.ml @@ -160,10 +160,10 @@ let minus_one = int IntLit.minus_one (** Create integer constant corresponding to the boolean value *) let bool b = if b then one else zero -(** Create expresstion [e1 == e2] *) +(** Create expression [e1 == e2] *) let eq e1 e2 = BinOp (Eq, e1, e2) -(** Create expresstion [e1 != e2] *) +(** Create expression [e1 != e2] *) let ne e1 e2 = BinOp (Ne, e1, e2) (** Create expression [e1 <= e2] *) diff --git a/infer/src/IR/Exp.mli b/infer/src/IR/Exp.mli index b4b36e033..cec9b52bd 100644 --- a/infer/src/IR/Exp.mli +++ b/infer/src/IR/Exp.mli @@ -104,13 +104,13 @@ val bool : bool -> t (** Create integer constant corresponding to the boolean value *) val eq : t -> t -> t -(** Create expresstion [e1 == e2] *) +(** Create expression [e1 == e2] *) val ne : t -> t -> t -(** Create expresstion [e1 != e2] *) +(** Create expression [e1 != e2] *) val le : t -> t -> t -(** Create expresstion [e1 <= e2] *) +(** Create expression [e1 <= e2] *) val lt : t -> t -> t (** Create expression [e1 < e2] *) diff --git a/infer/src/IR/Ident.mli b/infer/src/IR/Ident.mli index ebcd71e84..72bfc3689 100644 --- a/infer/src/IR/Ident.mli +++ b/infer/src/IR/Ident.mli @@ -55,7 +55,7 @@ module NameGenerator : sig end val idlist_to_idset : t list -> Set.t -(** Convert an identfier list to an identifier set *) +(** Convert an identifier list to an identifier set *) val kprimed : kind diff --git a/infer/src/IR/Pvar.ml b/infer/src/IR/Pvar.ml index 505f2dfd3..c3bd869cf 100644 --- a/infer/src/IR/Pvar.ml +++ b/infer/src/IR/Pvar.ml @@ -114,7 +114,7 @@ let get_simplified_name pv = s -(** Check if the pvar is an abucted return var or param passed by ref *) +(** Check if the pvar is an abducted return var or param passed by ref *) let is_abduced pv = match pv.pv_kind with Abduced_retvar _ | Abduced_ref_param _ -> true | _ -> false diff --git a/infer/src/IR/QualifiedCppName.mli b/infer/src/IR/QualifiedCppName.mli index 46d721360..0499d6f4b 100644 --- a/infer/src/IR/QualifiedCppName.mli +++ b/infer/src/IR/QualifiedCppName.mli @@ -38,7 +38,7 @@ val append_template_args_to_last : t -> args:string -> t template args *) val to_list : t -> string list -(** returns list of qualifers *) +(** returns list of qualifiers *) val to_rev_list : t -> string list (** returns reversed list of qualifiers, ie innermost scope is the first element *) diff --git a/infer/src/IR/Sil.ml b/infer/src/IR/Sil.ml index 947f84601..826b4fecc 100644 --- a/infer/src/IR/Sil.ml +++ b/infer/src/IR/Sil.ml @@ -184,7 +184,7 @@ and 'inst hpara_dll0 = type hpred = inst hpred0 -(** Comparsion between heap predicates. Reverse natural order, and order first by anchor exp. *) +(** Comparison between heap predicates. Reverse natural order, and order first by anchor exp. *) let compare_hpred ?(inst= false) hpred1 hpred2 = compare_hpred0 (match inst with true -> compare_inst | false -> fun _ _ -> 0) hpred1 hpred2 diff --git a/infer/src/absint/PatternMatch.ml b/infer/src/absint/PatternMatch.ml index fb3f03b89..b48c4ecec 100644 --- a/infer/src/absint/PatternMatch.ml +++ b/infer/src/absint/PatternMatch.ml @@ -240,7 +240,7 @@ let java_get_vararg_values node pvar idenv = let do_instr = function | Sil.Store (Exp.Lindex (array_exp, _), _, content_exp, _) when Exp.equal (Exp.Lvar pvar) (Idenv.expand_expr idenv array_exp) -> - (* Each vararg argument is an assigment to a pvar denoting an array of objects. *) + (* Each vararg argument is an assignment to a pvar denoting an array of objects. *) values := content_exp :: !values | _ -> () diff --git a/infer/src/eradicate/typeCheck.ml b/infer/src/eradicate/typeCheck.ml index d43c8e6eb..8e2796c53 100644 --- a/infer/src/eradicate/typeCheck.ml +++ b/infer/src/eradicate/typeCheck.ml @@ -253,7 +253,7 @@ let typecheck_instr tenv ext calls_this checks (node: Procdesc.Node.t) idenv get exp in (* Convert a complex expressions into a pvar. - When [is_assigment] is true, update the relevant annotations for the pvar. *) + When [is_assignment] is true, update the relevant annotations for the pvar. *) let convert_complex_exp_to_pvar node' is_assignment exp_ typestate loc = let exp = handle_field_access_via_temporary typestate (Idenv.expand_expr idenv exp_) in let default = (exp, typestate) in @@ -1024,7 +1024,7 @@ let typecheck_instr tenv ext calls_this checks (node: Procdesc.Node.t) idenv get typestate (* FIXME: silenced warning may be legit *) in - (* Handle assigment fron a temp pvar in a condition. + (* Handle assignment fron a temp pvar in a condition. This recognizes the handling of temp variables in ((x = ...) != null) *) let handle_assignment_in_condition pvar = match Procdesc.Node.get_preds node with diff --git a/infer/src/java/jClasspath.mli b/infer/src/java/jClasspath.mli index 41426c359..acdaa5632 100644 --- a/infer/src/java/jClasspath.mli +++ b/infer/src/java/jClasspath.mli @@ -43,7 +43,7 @@ val load_program : string -> JBasics.ClassSet.t -> program (** load a java program *) val lookup_node : JBasics.class_name -> program -> JCode.jcode Javalib.interface_or_class option -(** retrive a Java node from the classname *) +(** retrieve a Java node from the classname *) val add_missing_callee : program -> Typ.Procname.t -> JBasics.class_name -> JBasics.method_signature -> unit diff --git a/infer/src/java/jTransType.ml b/infer/src/java/jTransType.ml index cc64a8f02..fc75e8a2a 100644 --- a/infer/src/java/jTransType.ml +++ b/infer/src/java/jTransType.ml @@ -244,7 +244,7 @@ let create_sil_class_field cn {Javalib.cf_signature; cf_annotations; cf_kind} = and field_type = get_named_type (JBasics.fs_type cf_signature) and annotation = let real_annotations = JAnnotation.translate_item cf_annotations in - (* translate modifers like "volatile" as annotations *) + (* translate modifiers like "volatile" as annotations *) match cf_kind with | Javalib.Volatile -> (Annot.volatile, true) :: real_annotations diff --git a/infer/src/labs/ResourceLeaks.ml b/infer/src/labs/ResourceLeaks.ml index 0be26463e..1a46c723c 100644 --- a/infer/src/labs/ResourceLeaks.ml +++ b/infer/src/labs/ResourceLeaks.ml @@ -80,7 +80,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct (* No summary for callee_procname; it's native code or missing for some reason *) astate' ) | Assign (_lhs_access_path, _rhs_exp, _loc) -> - (* an assigment [lhs_access_path] := [rhs_exp] *) + (* an assignment [lhs_access_path] := [rhs_exp] *) astate | Assume (_assume_exp, _, _, _loc) -> (* a conditional assume([assume_exp]). blocks if [assume_exp] evaluates to false *) diff --git a/infer/src/unit/abstractInterpreterTests.ml b/infer/src/unit/abstractInterpreterTests.ml index 3263826af..ddfe0ce7a 100644 --- a/infer/src/unit/abstractInterpreterTests.ml +++ b/infer/src/unit/abstractInterpreterTests.ml @@ -125,7 +125,7 @@ let tests = ; (* point 2 *) invariant "1" ] , (* point 4 *) - [ (* ... so |paths through catch block| shoud be |number of instructions in try block| *) + [ (* ... so |paths through catch block| should be |number of instructions in try block| *) invariant "2" ] , (* could arrive here via (1, 2, 3), (1, 4), or (2, 4) *) [invariant "3"] ) diff --git a/infer/tests/codetoanalyze/cpp/siof/siof/siof_different_tu.cpp b/infer/tests/codetoanalyze/cpp/siof/siof/siof_different_tu.cpp index d75139c13..9b098461d 100644 --- a/infer/tests/codetoanalyze/cpp/siof/siof/siof_different_tu.cpp +++ b/infer/tests/codetoanalyze/cpp/siof/siof/siof_different_tu.cpp @@ -62,7 +62,7 @@ SomeNonPODObject& TemplatedObject::getGlobalNonPOD() { template struct TemplatedObject; } // namespace whitelisted -// initialise static class field +// initialize static class field template SomeTemplatedConstexprObject SomeTemplatedConstexprObject::instance_; SomeTemplatedConstexprObject& getGlobalTemplatedConstexpr() {