let find ~conflate_bottom ~with_alarms x y =
let v = find ~conflate_bottom ~with_alarms x y in
let v_v = V_Or_Uninitialized.get_v v in
let bottom = V.is_bottom v_v in
let flags = V_Or_Uninitialized.get_flags v in
if conflate_bottom then begin
if not (V_Or_Uninitialized.is_initialized flags)
then warn_uninitialized with_alarms;
if not (V_Or_Uninitialized.is_noesc flags)
then warn_escapingaddr with_alarms;
end;
if with_alarms.unspecified <> Aignore &&
bottom &&
not (V_Or_Uninitialized.is_initialized flags &&
V_Or_Uninitialized.is_noesc flags )
then begin
match with_alarms.unspecified with
| Aignore -> assert false
| Acall f -> f ()
| Alog _ ->
Kernel.warning ~current:true ~once:true
"completely undefined value in %a."
Locations.pretty y;
end;
v_v