Minor simplifications

Reviewed By: jeremydubreil

Differential Revision: D9313650

fbshipit-source-id: 0891e5d33
master
Mehdi Bouaziz 6 years ago committed by Facebook Github Bot
parent bedf32bed5
commit 96d1f00687

@ -238,7 +238,7 @@ let report_cycle tenv summary prop =
unsafe_unretained fields. Otherwise we report a retain cycle. *) unsafe_unretained fields. Otherwise we report a retain cycle. *)
let cycles = get_retain_cycles tenv prop in let cycles = get_retain_cycles tenv prop in
RetainCyclesType.Set.iter RetainCyclesType.print_cycle cycles ; RetainCyclesType.Set.iter RetainCyclesType.print_cycle cycles ;
if RetainCyclesType.Set.cardinal cycles > 0 then ( if not (RetainCyclesType.Set.is_empty cycles) then (
RetainCyclesType.Set.iter RetainCyclesType.Set.iter
(fun cycle -> (fun cycle ->
let exn = exn_retain_cycle tenv cycle in let exn = exn_retain_cycle tenv cycle in

@ -1960,7 +1960,7 @@ and sym_exec_wrapper exe_env handle_exn tenv summary proc_cfg instr
(* Check for retain cycles after assignments and method calls *) (* Check for retain cycles after assignments and method calls *)
( match instr with ( match instr with
| (Sil.Store _ | Sil.Call _) when !Config.footprint -> | (Sil.Store _ | Sil.Call _) when !Config.footprint ->
List.iter ~f:(RetainCycles.report_cycle tenv summary) [p] RetainCycles.report_cycle tenv summary p
| _ -> | _ ->
() ) ; () ) ;
let node_has_abstraction node = let node_has_abstraction node =

Loading…
Cancel
Save