Tweak formatting of CxxAnnotationSpecs output

Reviewed By: jvillard

Differential Revision: D14851159

fbshipit-source-id: 951db7ac1
master
David Lively 6 years ago committed by Facebook Github Bot
parent 996f7c4f02
commit 2682cdb463

@ -345,14 +345,15 @@ module CxxAnnotationSpecs = struct
if List.is_empty overrides then fun _ -> false
else make_pname_pred overrides ~src:(sinks_src ^ " -> overrides")
in
let call_str = " ->\n " in
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 final_trace = List.rev (update_trace call_loc trace) in
let snk_pname_str = Typ.Procname.to_string snk_pname in
let src_pname_str = Typ.Procname.to_string src_pname in
let description =
Format.asprintf "%s %a calls\n\t%a\n%s" src_desc MF.pp_monospaced
(Typ.Procname.to_string src_pname)
MF.pp_monospaced (stack_str ^ snk_pname_str) snk_desc
Format.asprintf "%s can reach %s:\n %s%s%s%s" src_desc snk_desc src_pname_str call_str
stack_str snk_pname_str
in
let issue_type =
let doc_url =
@ -374,7 +375,7 @@ module CxxAnnotationSpecs = struct
try
let sink_map = AnnotReachabilityDomain.find snk_annot annot_map in
report_call_stack proc_data.Callbacks.summary snk_pred
~string_of_pname:cxx_string_of_pname ~call_str:" ->\n\t"
~string_of_pname:cxx_string_of_pname ~call_str
(lookup_annotation_calls ~caller_pdesc:proc_desc snk_annot)
report_cxx_annotation_stack (CallSite.make proc_name loc) sink_map
with Caml.Not_found -> ()

Loading…
Cancel
Save