Skip to content

Commit 4382ecb

Browse files
committed
replaced map by iter and added an explanation comment for special function arguments evaluation
1 parent e0f2328 commit 4382ecb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/analyses/base.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,8 +2476,9 @@ struct
24762476
| _ ->
24772477
set ~man st lv_a lv_typ (VD.top_value (unrollType lv_typ))
24782478
end
2479-
in
2480-
List.map (eval_rv ~man st) args |> ignore;
2479+
in
2480+
(* Evaluate each functions arguments. `eval_rv` is only called for its side effects, we ignore the result. *)
2481+
List.iter (fun arg -> eval_rv ~man st arg |> ignore) args;
24812482
let st = match desc.special args, f.vname with
24822483
| Memset { dest; ch; count; }, _ ->
24832484
(* TODO: check count *)

0 commit comments

Comments
 (0)