From e1806cbbb2646a88189e68ba5ba5dbca73a88898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezgi=20=C3=87i=C3=A7ek?= Date: Thu, 17 Sep 2020 08:10:27 -0700 Subject: [PATCH] [cost] Don't compare callsite location for symbols Reviewed By: skcho Differential Revision: D23731381 fbshipit-source-id: 400199be3 --- infer/src/bufferoverrun/symb.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/infer/src/bufferoverrun/symb.ml b/infer/src/bufferoverrun/symb.ml index 2887b0db8..0c316895d 100644 --- a/infer/src/bufferoverrun/symb.ml +++ b/infer/src/bufferoverrun/symb.ml @@ -24,10 +24,14 @@ module SymbolPath = struct let compare_deref_kind _ _ = 0 + type callsite = CallSite.t + + let compare_callsite x y = Procname.compare (CallSite.pname x) (CallSite.pname y) + type prim = | Pvar of Pvar.t | Deref of deref_kind * partial - | Callsite of {ret_typ: Typ.t; cs: CallSite.t; obj_path: partial option [@compare.ignore]} + | Callsite of {ret_typ: Typ.t; cs: callsite; obj_path: partial option [@compare.ignore]} [@@deriving compare] and partial = prim BoField.t [@@deriving compare]