[litho] Analyze child using its code and summary

Reviewed By: ezgicicek

Differential Revision: D18887950

fbshipit-source-id: ab90a2dac
master
Sungkeun Cho 5 years ago committed by Facebook Github Bot
parent 2835468df9
commit dc85213813

@ -41,14 +41,6 @@ let is_component procname tenv =
false
let is_call_build_inside procname tenv =
match Typ.Procname.get_method procname with
| "child" ->
is_component_builder procname tenv
| _ ->
false
let is_component_build_method procname tenv =
match Typ.Procname.get_method procname with
| "build" ->
@ -168,15 +160,6 @@ struct
| None ->
if is_component_build_method callee_pname tenv then
Domain.call_build_method ~ret:return_access_path ~receiver astate
else if is_call_build_inside callee_pname tenv then
match actuals with
| _ :: HilExp.AccessExpression ae :: _ ->
let receiver =
Domain.LocalAccessPath.make_from_access_expression ae caller_pname
in
Domain.call_build_method ~ret:return_access_path ~receiver astate
| _ ->
astate
else if is_component_builder callee_pname tenv then
let callee_prefix = Domain.MethodCallPrefix.make receiver callee_pname location in
Domain.call_builder ~ret:return_access_path ~receiver callee_prefix astate

@ -122,9 +122,8 @@ module LithoContext = struct
let satisfies_heuristic ~callee_pname ~callee_summary_opt tenv =
(* If the method is build() or create() itself or doesn't contain a build() in
its summary, we want to track it in the domain. *)
( LithoFramework.is_component_build_method callee_pname tenv
LithoFramework.is_component_build_method callee_pname tenv
|| LithoFramework.is_component_create_method callee_pname tenv
|| (Config.new_litho_domain && LithoFramework.is_call_build_inside callee_pname tenv) )
||
(* check if build()/create() exists in callees *)
let build_exists_in_callees =

Loading…
Cancel
Save