[cost] suppress check is_on_ui_thread for ObjC method

Summary: Cost analysis has an additional mode that checks whether the function occurs on a UI (main) thread. If so, it warns the user. This check is only supported for Java and C++ but not for ObjC, so the diff suppresses this check for ObjC, and set ```is_on_ui_thread``` to ```false``` by default.

Reviewed By: ezgicicek

Differential Revision: D21952470

fbshipit-source-id: 838dd5639
master
Qianyi Shu 5 years ago committed by Facebook GitHub Bot
parent af18770146
commit 09b54e7858

@ -263,7 +263,9 @@ let checker ({InterproceduralAnalysis.proc_desc; exe_env; analyze_dependency} as
let bound_map =
compute_bound_map node_cfg inferbo_invariant_map control_dep_invariant_map loop_inv_map
in
let is_on_ui_thread = ConcurrencyModels.runs_on_ui_thread tenv proc_name in
let is_on_ui_thread =
(not (Procname.is_objc_method proc_name)) && ConcurrencyModels.runs_on_ui_thread tenv proc_name
in
let get_node_nb_exec = compute_get_node_nb_exec node_cfg bound_map in
let astate =
let open IOption.Let_syntax in

Loading…
Cancel
Save