|
|
|
@ -10,6 +10,7 @@ open! IStd
|
|
|
|
|
|
|
|
|
|
(** Classify bugs into buckets *)
|
|
|
|
|
|
|
|
|
|
module DExp = DecompiledExp
|
|
|
|
|
module L = Logging
|
|
|
|
|
|
|
|
|
|
let verbose = Config.trace_error
|
|
|
|
@ -152,5 +153,9 @@ let check_access access_opt de_opt =
|
|
|
|
|
|
|
|
|
|
let classify_access desc access_opt de_opt is_nullable =
|
|
|
|
|
let default_bucket = if is_nullable then Localise.BucketLevel.b1 else Localise.BucketLevel.b5 in
|
|
|
|
|
let bucket = check_access access_opt de_opt |> Option.value ~default:default_bucket in
|
|
|
|
|
let tmp_var = Option.value_map de_opt ~default:false ~f:DExp.has_tmp_var in
|
|
|
|
|
let bucket =
|
|
|
|
|
if tmp_var then Localise.BucketLevel.b5
|
|
|
|
|
else check_access access_opt de_opt |> Option.value ~default:default_bucket
|
|
|
|
|
in
|
|
|
|
|
Localise.error_desc_set_bucket desc bucket
|
|
|
|
|