let warn_locals_escape is_block fundec k locals =
  let pretty_base = Base.pretty in
  let pretty_block fmt = Pretty_utils.pp_cond is_block fmt "a block of " in
  let sv = fundec.svar in
  match locals with
    Location_Bytes.Top_Param.Top ->
      warning_once_current
        "locals escaping the scope of %t%a through %a"
        pretty_block
        !d_var sv
        pretty_base k
  | Location_Bytes.Top_Param.Set _ ->
      warning_once_current
        "locals %a escaping the scope of %t%a through %a"
        Location_Bytes.Top_Param.pretty locals
        pretty_block
        !d_var sv
        pretty_base k