Skip to content

Commit 461485c

Browse files
committed
Remove constant arguments of helper functions in base invalidate
1 parent 8f3328a commit 461485c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/analyses/base.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,20 +2122,17 @@ struct
21222122
if exps <> [] then M.info ~category:Imprecise "Invalidating expressions: %a" (d_list ", " d_exp) exps;
21232123
(* To invalidate a single address, we create a pair with its corresponding
21242124
* top value. *)
2125-
let invalidate_addr st (a: Addr.t) =
2125+
let invalidate_addr (a: Addr.t) =
21262126
let t = Addr.type_of a in
21272127
let v = get_addr ~man st a None in (* None here is ok, just causes us to be a bit less precise *)
21282128
let nv = VD.invalidate_value (Queries.to_value_domain_ask (Analyses.ask_of_man man)) t v in
21292129
(a, t, nv)
21302130
in
2131-
(* We define the function that invalidates all the values that an address
2132-
* expression e may point to *)
2133-
let invalidate_exp exps =
2131+
let invalids =
21342132
let args = collect_invalidate ~deep ~man ~warn:true st exps in (* NB! the returned list isn't necessarily as long as exps *)
21352133
let args = List.concat_map AD.elements args in (* split all address sets up because each address of different type (and with different current value) should get a different invalidated value *)
2136-
List.map (invalidate_addr st) args
2134+
List.map invalidate_addr args
21372135
in
2138-
let invalids = invalidate_exp exps in
21392136
let is_fav_addr x =
21402137
GobOption.exists BaseUtil.is_excluded_from_invalidation (Addr.to_var_may x)
21412138
in

0 commit comments

Comments
 (0)