From ed638de1895f70fd24f588ef1bd39d2a27f621f5 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Wed, 22 Aug 2018 15:15:33 -0700 Subject: [PATCH] [eradicate] remove the check extension flag which was always false Reviewed By: mbouaziz Differential Revision: D9130163 fbshipit-source-id: 4510eb4a5 --- infer/src/eradicate/eradicate.ml | 8 +++----- infer/src/eradicate/typeCheck.ml | 2 +- infer/src/eradicate/typeCheck.mli | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/infer/src/eradicate/eradicate.ml b/infer/src/eradicate/eradicate.ml index 65d93ffec..d2be921e8 100644 --- a/infer/src/eradicate/eradicate.ml +++ b/infer/src/eradicate/eradicate.ml @@ -139,7 +139,7 @@ module MkCallback (Extension : ExtensionT) : CallBackT = struct in let checks', calls_this' = if do_checks then (checks, calls_this) - else ({TypeCheck.eradicate= false; check_extension= false; check_ret_type= []}, ref false) + else ({TypeCheck.eradicate= false; check_ret_type= []}, ref false) in callback1 tenv find_canonical_duplicate calls_this' checks' idenv_pn pname pdesc ann_sig linereader loc @@ -349,13 +349,11 @@ end (** Eradicate checker for Java @Nullable annotations. *) let callback_eradicate = - let checks = {TypeCheck.eradicate= true; check_extension= false; check_ret_type= []} in + let checks = {TypeCheck.eradicate= true; check_ret_type= []} in Main.callback checks (** Call the given check_return_type at the end of every procedure. *) let callback_check_return_type check_return_type callback_args = - let checks = - {TypeCheck.eradicate= false; check_extension= false; check_ret_type= [check_return_type]} - in + let checks = {TypeCheck.eradicate= false; check_ret_type= [check_return_type]} in Main.callback checks callback_args diff --git a/infer/src/eradicate/typeCheck.ml b/infer/src/eradicate/typeCheck.ml index 7cf348eac..f0c6d62e7 100644 --- a/infer/src/eradicate/typeCheck.ml +++ b/infer/src/eradicate/typeCheck.ml @@ -136,7 +136,7 @@ type check_return_type = type find_canonical_duplicate = Procdesc.Node.t -> Procdesc.Node.t -type checks = {eradicate: bool; check_extension: bool; check_ret_type: check_return_type list} +type checks = {eradicate: bool; check_ret_type: check_return_type list} (** Typecheck an expression. *) let rec typecheck_expr find_canonical_duplicate visited checks tenv node instr_ref diff --git a/infer/src/eradicate/typeCheck.mli b/infer/src/eradicate/typeCheck.mli index f54b9f646..4606f0e70 100644 --- a/infer/src/eradicate/typeCheck.mli +++ b/infer/src/eradicate/typeCheck.mli @@ -14,7 +14,7 @@ type check_return_type = type find_canonical_duplicate = Procdesc.Node.t -> Procdesc.Node.t -type checks = {eradicate: bool; check_extension: bool; check_ret_type: check_return_type list} +type checks = {eradicate: bool; check_ret_type: check_return_type list} val typecheck_node : Tenv.t -> bool ref -> checks -> Idenv.t -> Typ.Procname.t -> Procdesc.t