diff --git a/infer/src/IR/StructTyp.re b/infer/src/IR/StructTyp.re index cb9c1563d..4370b3ee9 100644 --- a/infer/src/IR/StructTyp.re +++ b/infer/src/IR/StructTyp.re @@ -34,20 +34,18 @@ type lookup = Typename.t => option t; let compare_fld_typ_ann = [%compare : (Ident.fieldname, Typ.t, Annot.Item.t)]; -let pp pe pp_base name f {fields} => +let pp pe name f {fields} => if false { /* change false to true to print the details of struct */ F.fprintf f - "%a {%a} %a" + "%a {%a}" Typename.pp name (pp_seq (fun f (fld, t, _) => F.fprintf f "%a %a" (Typ.pp_full pe) t Ident.pp_fieldname fld)) fields - pp_base - () } else { - F.fprintf f "%a %a" Typename.pp name pp_base () + F.fprintf f "%a" Typename.pp name }; let internal_mk_struct diff --git a/infer/src/IR/StructTyp.rei b/infer/src/IR/StructTyp.rei index 22baf7c6e..a6e2c66fb 100644 --- a/infer/src/IR/StructTyp.rei +++ b/infer/src/IR/StructTyp.rei @@ -37,7 +37,7 @@ let compare_fld_typ_ann: /** Pretty print a struct type. */ -let pp: printenv => (F.formatter => unit => unit) => Typename.t => F.formatter => t => unit; +let pp: printenv => Typename.t => F.formatter => t => unit; /** Construct a struct_typ, normalizing field types */ diff --git a/infer/src/IR/Tenv.re b/infer/src/IR/Tenv.re index b3dd20a9e..bb4e2d03c 100644 --- a/infer/src/IR/Tenv.re +++ b/infer/src/IR/Tenv.re @@ -130,7 +130,7 @@ let pp fmt (tenv: t) => ( fun name typ => { Format.fprintf fmt "@[<6>NAME: %s@." (Typename.to_string name); - Format.fprintf fmt "@[<6>TYPE: %a@." (StructTyp.pp pe_text (fun _ () => ()) name) typ + Format.fprintf fmt "@[<6>TYPE: %a@." (StructTyp.pp pe_text name) typ } ) tenv; diff --git a/infer/src/clang/objcInterface_decl.ml b/infer/src/clang/objcInterface_decl.ml index 3a1246d2d..d22bc1251 100644 --- a/infer/src/clang/objcInterface_decl.ml +++ b/infer/src/clang/objcInterface_decl.ml @@ -132,7 +132,7 @@ let add_class_to_tenv type_ptr_to_sil_type tenv curr_class decl_info name_info d (match Tenv.lookup tenv interface_name with | Some st -> Logging.out_debug " >>>OK. Found typ='%a'\n" - (StructTyp.pp pe_text (fun _ () -> ()) interface_name) st + (StructTyp.pp pe_text interface_name) st | None -> Logging.out_debug " >>>NOT Found!!\n"); Typ.Tstruct interface_name