Inferbo: use instr_is_auxiliary

Reviewed By: jvillard

Differential Revision: D8160995

fbshipit-source-id: 99190a9
master
Mehdi Bouaziz 7 years ago committed by Facebook Github Bot
parent f46034cfb3
commit bfcc88a5e2

@ -315,19 +315,12 @@ module Report = struct
module PO = BufferOverrunProofObligations module PO = BufferOverrunProofObligations
module ExitStatement = struct module ExitStatement = struct
let non_significant_instr = function
| Sil.(Abstract _ | Nullify _ | Remove_temps _) ->
true
| _ ->
false
(* check that we are the last significant instruction (* check that we are the last significant instruction
* of a procedure (no more significant instruction) * of a procedure (no more significant instruction)
* or of a block (goes directly to a node with multiple predecessors) * or of a block (goes directly to a node with multiple predecessors)
*) *)
let rec is_end_of_block_or_procedure (cfg: CFG.t) node rem_instrs = let rec is_end_of_block_or_procedure (cfg: CFG.t) node rem_instrs =
List.for_all rem_instrs ~f:non_significant_instr List.for_all rem_instrs ~f:Sil.instr_is_auxiliary
&& &&
match CFG.succs cfg node with match CFG.succs cfg node with
| [] -> | [] ->

Loading…
Cancel
Save