From 08ea9eaee89aca1bf9c26f4b19f3cc0bcb2de68f Mon Sep 17 00:00:00 2001 From: Sungkeun Cho Date: Thu, 29 Apr 2021 07:55:19 -0700 Subject: [PATCH] [ConfigImpact] Revise checking of having known expensive calls Summary: It missed `unchecked_callees_cond`, which introduced FNs. Reviewed By: ezgicicek Differential Revision: D28088784 fbshipit-source-id: bfd5d92d0 --- infer/src/cost/ConfigImpactAnalysis.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/infer/src/cost/ConfigImpactAnalysis.ml b/infer/src/cost/ConfigImpactAnalysis.ml index 9da22f6e3..1b26c61f9 100644 --- a/infer/src/cost/ConfigImpactAnalysis.ml +++ b/infer/src/cost/ConfigImpactAnalysis.ml @@ -138,6 +138,10 @@ module UncheckedCalleesCond = struct map (UncheckedCallees.replace_location_by_call location) fields_map + let has_known_expensive_callee fields_map = + exists (fun _ callees -> UncheckedCallees.has_known_expensive_callee callees) fields_map + + let filter_known_expensive fields_map = filter_map (fun _ callees -> @@ -225,8 +229,9 @@ module Summary = struct {x with unchecked_callees; unchecked_callees_cond= UncheckedCalleesCond.bottom} - let has_known_expensive_callee {unchecked_callees} = + let has_known_expensive_callee {unchecked_callees; unchecked_callees_cond} = UncheckedCallees.has_known_expensive_callee unchecked_callees + || UncheckedCalleesCond.has_known_expensive_callee unchecked_callees_cond end module Dom = struct