More tweaking of annotation-reachability-cxx output

Reviewed By: jvillard

Differential Revision: D14891558

fbshipit-source-id: e37289acf
master
David Lively 6 years ago committed by Facebook Github Bot
parent b5589661ce
commit 67cd0e1cd7

@ -296,7 +296,9 @@ module CxxAnnotationSpecs = struct
let pname_str = Typ.Procname.to_string pname in let pname_str = Typ.Procname.to_string pname in
let i = Option.value (String.rindex pname_str ':') ~default:(-1) + 1 in let i = Option.value (String.rindex pname_str ':') ~default:(-1) + 1 in
let slen = String.length pname_str in let slen = String.length pname_str in
String.sub pname_str ~pos:0 ~len:i ^ chop_prefix (String.sub pname_str ~pos:i ~len:(slen - i)) String.sub pname_str ~pos:0 ~len:i
^ chop_prefix (String.sub pname_str ~pos:i ~len:(slen - i))
^ "()"
let spec_from_config spec_name spec_cfg = let spec_from_config spec_name spec_cfg =
@ -349,10 +351,10 @@ module CxxAnnotationSpecs = struct
let report_cxx_annotation_stack src_summary loc trace stack_str snk_pname call_loc = let report_cxx_annotation_stack src_summary loc trace stack_str snk_pname call_loc =
let src_pname = Summary.get_proc_name src_summary in let src_pname = Summary.get_proc_name src_summary in
let final_trace = List.rev (update_trace call_loc trace) in let final_trace = List.rev (update_trace call_loc trace) in
let snk_pname_str = Typ.Procname.to_string snk_pname in let snk_pname_str = cxx_string_of_pname snk_pname in
let src_pname_str = Typ.Procname.to_string src_pname in let src_pname_str = cxx_string_of_pname src_pname in
let description = let description =
Format.asprintf "%s can reach %s:\n %s%s%s%s" src_desc snk_desc src_pname_str call_str Format.asprintf "%s can reach %s:\n %s%s%s%s\n" src_desc snk_desc src_pname_str call_str
stack_str snk_pname_str stack_str snk_pname_str
in in
let issue_type = let issue_type =

Loading…
Cancel
Save