[debug] Print proc attributes on the procedure page

Reviewed By: jeremydubreil

Differential Revision: D10238661

fbshipit-source-id: 2de9ee425
master
Mehdi Bouaziz 6 years ago committed by Facebook Github Bot
parent 15839539a7
commit b90c2f3bfc

@ -24,13 +24,13 @@ let equal_access = [%compare.equal: access]
let string_of_access = function
| Default ->
"<Default>"
"Default"
| Public ->
"<Public>"
"Public"
| Private ->
"<Private>"
"Private"
| Protected ->
"<Protected>"
"Protected"
(** Return the value of the FA_sentinel attribute in [attr_list] if it is found *)

@ -132,7 +132,6 @@ let pp f
F.fprintf f "; access= %a@," (Pp.to_string ~f:PredSymb.string_of_access) access ;
if not ([%compare.equal: (Mangled.t * Typ.t) list] default.captured captured) then
F.fprintf f "; captured= [@[%a@]]@," pp_parameters captured ;
pp_bool_default ~default:default.did_preanalysis "did_preanalysis" did_preanalysis f () ;
if not ([%compare.equal: string list] default.exceptions exceptions) then
F.fprintf f "; exceptions= [@[%a@]]@,"
(Pp.semicolon_seq ~print_env:Pp.text_break F.pp_print_string)
@ -166,10 +165,7 @@ let pp f
(Pp.to_string ~f:ClangMethodKind.to_string)
clang_method_kind ;
if not (Location.equal default.loc loc) then F.fprintf f "; loc= %a@," Location.pp_file_pos loc ;
if not ([%compare.equal: var_data list] default.locals locals) then
F.fprintf f "; locals= [@[%a@]]@,"
(Pp.semicolon_seq ~print_env:Pp.text_break pp_var_data)
locals ;
F.fprintf f "; locals= [@[%a@]]@," (Pp.semicolon_seq ~print_env:Pp.text_break pp_var_data) locals ;
pp_bool_default ~default:default.has_added_return_param "has_added_return_param"
has_added_return_param f () ;
if not (Annot.Method.is_empty method_annotation) then

@ -217,8 +217,7 @@ let node_finish_session node =
source )
(** Write html file for the procedure.
The boolean indicates whether to print whole seconds only *)
(** Write html file for the procedure. *)
let write_proc_html pdesc =
if Config.write_html then (
let pname = Procdesc.get_proc_name pdesc in
@ -234,11 +233,13 @@ let write_proc_html pdesc =
[])
linenum ;
Pp.seq (pp_node_link [] ~description:true) fmt nodes ;
match Summary.get pname with
( match Summary.get pname with
| None ->
()
| Some summary ->
Summary.pp_html source Black fmt summary ;
F.pp_print_string fmt "<br />@\n" ;
Summary.pp_html source Black fmt summary ) ;
F.fprintf fmt "<hr />@\n<pre>@\n%a</pre>@\n" ProcAttributes.pp (Procdesc.get_attributes pdesc) ;
Io_infer.Html.close (fd, fmt) )

Loading…
Cancel
Save