[infer][PR] Fix spelling errors

Summary: Closes https://github.com/facebook/infer/pull/917

Differential Revision: D7953437

Pulled By: jvillard

fbshipit-source-id: b77a243
master
Oliver Castillo 7 years ago committed by Facebook Github Bot
parent 3aa6fdf1ce
commit fb4e7ee4a4

@ -160,10 +160,10 @@ let minus_one = int IntLit.minus_one
(** Create integer constant corresponding to the boolean value *) (** Create integer constant corresponding to the boolean value *)
let bool b = if b then one else zero 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) let eq e1 e2 = BinOp (Eq, e1, e2)
(** Create expresstion [e1 != e2] *) (** Create expression [e1 != e2] *)
let ne e1 e2 = BinOp (Ne, e1, e2) let ne e1 e2 = BinOp (Ne, e1, e2)
(** Create expression [e1 <= e2] *) (** Create expression [e1 <= e2] *)

@ -104,13 +104,13 @@ val bool : bool -> t
(** Create integer constant corresponding to the boolean value *) (** Create integer constant corresponding to the boolean value *)
val eq : t -> t -> t val eq : t -> t -> t
(** Create expresstion [e1 == e2] *) (** Create expression [e1 == e2] *)
val ne : t -> t -> t val ne : t -> t -> t
(** Create expresstion [e1 != e2] *) (** Create expression [e1 != e2] *)
val le : t -> t -> t val le : t -> t -> t
(** Create expresstion [e1 <= e2] *) (** Create expression [e1 <= e2] *)
val lt : t -> t -> t val lt : t -> t -> t
(** Create expression [e1 < e2] *) (** Create expression [e1 < e2] *)

@ -55,7 +55,7 @@ module NameGenerator : sig
end end
val idlist_to_idset : t list -> Set.t 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 val kprimed : kind

@ -114,7 +114,7 @@ let get_simplified_name pv =
s 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 = let is_abduced pv =
match pv.pv_kind with Abduced_retvar _ | Abduced_ref_param _ -> true | _ -> false match pv.pv_kind with Abduced_retvar _ | Abduced_ref_param _ -> true | _ -> false

@ -38,7 +38,7 @@ val append_template_args_to_last : t -> args:string -> t
template args *) template args *)
val to_list : t -> string list val to_list : t -> string list
(** returns list of qualifers *) (** returns list of qualifiers *)
val to_rev_list : t -> string list val to_rev_list : t -> string list
(** returns reversed list of qualifiers, ie innermost scope is the first element *) (** returns reversed list of qualifiers, ie innermost scope is the first element *)

@ -184,7 +184,7 @@ and 'inst hpara_dll0 =
type hpred = inst hpred0 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 = let compare_hpred ?(inst= false) hpred1 hpred2 =
compare_hpred0 (match inst with true -> compare_inst | false -> fun _ _ -> 0) hpred1 hpred2 compare_hpred0 (match inst with true -> compare_inst | false -> fun _ _ -> 0) hpred1 hpred2

@ -240,7 +240,7 @@ let java_get_vararg_values node pvar idenv =
let do_instr = function let do_instr = function
| Sil.Store (Exp.Lindex (array_exp, _), _, content_exp, _) | Sil.Store (Exp.Lindex (array_exp, _), _, content_exp, _)
when Exp.equal (Exp.Lvar pvar) (Idenv.expand_expr idenv array_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 values := content_exp :: !values
| _ -> | _ ->
() ()

@ -253,7 +253,7 @@ let typecheck_instr tenv ext calls_this checks (node: Procdesc.Node.t) idenv get
exp exp
in in
(* Convert a complex expressions into a pvar. (* 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 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 exp = handle_field_access_via_temporary typestate (Idenv.expand_expr idenv exp_) in
let default = (exp, typestate) 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 typestate
(* FIXME: silenced warning may be legit *) (* FIXME: silenced warning may be legit *)
in 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) *) This recognizes the handling of temp variables in ((x = ...) != null) *)
let handle_assignment_in_condition pvar = let handle_assignment_in_condition pvar =
match Procdesc.Node.get_preds node with match Procdesc.Node.get_preds node with

@ -43,7 +43,7 @@ val load_program : string -> JBasics.ClassSet.t -> program
(** load a java program *) (** load a java program *)
val lookup_node : JBasics.class_name -> program -> JCode.jcode Javalib.interface_or_class option 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 : val add_missing_callee :
program -> Typ.Procname.t -> JBasics.class_name -> JBasics.method_signature -> unit program -> Typ.Procname.t -> JBasics.class_name -> JBasics.method_signature -> unit

@ -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 field_type = get_named_type (JBasics.fs_type cf_signature)
and annotation = and annotation =
let real_annotations = JAnnotation.translate_item cf_annotations in 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 match cf_kind with
| Javalib.Volatile -> | Javalib.Volatile ->
(Annot.volatile, true) :: real_annotations (Annot.volatile, true) :: real_annotations

@ -80,7 +80,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
(* No summary for callee_procname; it's native code or missing for some reason *) (* No summary for callee_procname; it's native code or missing for some reason *)
astate' ) astate' )
| Assign (_lhs_access_path, _rhs_exp, _loc) -> | Assign (_lhs_access_path, _rhs_exp, _loc) ->
(* an assigment [lhs_access_path] := [rhs_exp] *) (* an assignment [lhs_access_path] := [rhs_exp] *)
astate astate
| Assume (_assume_exp, _, _, _loc) -> | Assume (_assume_exp, _, _, _loc) ->
(* a conditional assume([assume_exp]). blocks if [assume_exp] evaluates to false *) (* a conditional assume([assume_exp]). blocks if [assume_exp] evaluates to false *)

@ -125,7 +125,7 @@ let tests =
; (* point 2 *) ; (* point 2 *)
invariant "1" ] invariant "1" ]
, (* point 4 *) , (* 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" ] invariant "2" ]
, (* could arrive here via (1, 2, 3), (1, 4), or (2, 4) *) , (* could arrive here via (1, 2, 3), (1, 4), or (2, 4) *)
[invariant "3"] ) [invariant "3"] )

@ -62,7 +62,7 @@ SomeNonPODObject& TemplatedObject<T>::getGlobalNonPOD() {
template struct TemplatedObject<int>; template struct TemplatedObject<int>;
} // namespace whitelisted } // namespace whitelisted
// initialise static class field // initialize static class field
template <typename T> template <typename T>
SomeTemplatedConstexprObject<T> SomeTemplatedConstexprObject<T>::instance_; SomeTemplatedConstexprObject<T> SomeTemplatedConstexprObject<T>::instance_;
SomeTemplatedConstexprObject<int>& getGlobalTemplatedConstexpr() { SomeTemplatedConstexprObject<int>& getGlobalTemplatedConstexpr() {

Loading…
Cancel
Save