From 36478936c73d8e40835d9f920b5e33651903a332 Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Mon, 26 Mar 2018 08:43:58 -0700 Subject: [PATCH] [retain cycles] Print the type id in a more user-friendly way Reviewed By: mbouaziz Differential Revision: D7399209 fbshipit-source-id: 604110b --- infer/src/backend/RetainCycles.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infer/src/backend/RetainCycles.ml b/infer/src/backend/RetainCycles.ml index 859b31b5e..04059fcea 100644 --- a/infer/src/backend/RetainCycles.ml +++ b/infer/src/backend/RetainCycles.ml @@ -19,7 +19,9 @@ let desc_retain_cycle tenv (cycle: RetainCyclesType.t) = let node = State.get_node () in let from_exp_str edge_obj = let type_str = - MF.monospaced_to_string (Format.sprintf "%s*" (Typ.to_string edge_obj.rc_from.rc_node_typ)) + let typ_str = Typ.to_string edge_obj.rc_from.rc_node_typ in + if String.equal typ_str "objc_object" then MF.monospaced_to_string "id" + else MF.monospaced_to_string (Format.sprintf "%s*" typ_str) in match Errdesc.find_outermost_dereference tenv node edge_obj.rc_from.rc_node_exp with | Some de