[Infer][bucketing] Moving warnings on dereferences of @Nullable params from B5 -> B1,

master
Sam Blackshear 10 years ago
parent 2bce7c6c3d
commit 231043f5bc

@ -101,9 +101,9 @@ let check_access access_opt =
Some Localise.BucketLevel.b1
| _ -> None
let classify_access desc access_opt =
L.d_strln "Doing classification";
let classify_access desc access_opt is_nullable =
let default_bucket = if is_nullable then Localise.BucketLevel.b1 else Localise.BucketLevel.b5 in
let show_in_message = !Config.show_buckets in
match check_access access_opt with
| None -> Localise.error_desc_set_bucket desc Localise.BucketLevel.b5 show_in_message
| None -> Localise.error_desc_set_bucket desc default_bucket show_in_message
| Some bucket -> Localise.error_desc_set_bucket desc bucket show_in_message

@ -8,5 +8,5 @@
open Utils
(** Classify the bucket of an error desc using Location.access information *)
val classify_access : Localise.error_desc -> Localise.access option -> Localise.error_desc
(** Classify the bucket of an error desc using Location.access and nullable information *)
val classify_access : Localise.error_desc -> Localise.access option -> bool -> Localise.error_desc

@ -749,7 +749,7 @@ let create_dereference_desc
| _ -> desc)
| _ -> desc
else desc in
if use_buckets then Buckets.classify_access desc access_opt'
if use_buckets then Buckets.classify_access desc access_opt' is_nullable
else desc
(** explain memory access performed by the current instruction

Loading…
Cancel
Save