[CCBM] Support more config format (GK)

Reviewed By: ezgicicek

Differential Revision: D22044309

fbshipit-source-id: 7dbcd4f1f
master
Sungkeun Cho 5 years ago committed by Facebook GitHub Bot
parent f43901bc69
commit ce7317e5cd

@ -405,12 +405,14 @@ module TransferFunctions = struct
| Call (_, Const (Cfun callee), _ :: (Const (Cint marker), _) :: _, _, _)
when FbGKInteraction.is_marker_end tenv callee ->
Dom.call_marker_end marker astate
| Call (_, Const (Cfun callee), _ :: (Var id, _) :: _, location, _)
when FbGKInteraction.is_config_check tenv callee ->
Dom.call_config_check analysis_data id location astate
| Call (_, Const (Cfun callee), _, location, _) ->
Option.value_map (analyze_dependency callee) ~default:astate ~f:(fun (_, callee_summary) ->
Dom.instantiate_callee analysis_data ~callee ~callee_summary location astate )
| Call (_, Const (Cfun callee), args, location, _) -> (
match FbGKInteraction.get_config_check tenv callee args with
| Some id ->
Dom.call_config_check analysis_data id location astate
| None ->
Option.value_map (analyze_dependency callee) ~default:astate
~f:(fun (_, callee_summary) ->
Dom.instantiate_callee analysis_data ~callee ~callee_summary location astate ) )
| _ ->
astate

@ -19,7 +19,7 @@ end
let get_config _ = None
let is_config_check _ _ = false
let get_config_check _ _ _ = None
let is_marker_start _ _ = false

@ -17,7 +17,7 @@ end
val get_config : 'exp -> 'config_name option
val is_config_check : 'tenv -> 'pname -> bool
val get_config_check : 'tenv -> 'pname -> 'args -> 'ident option
val is_marker_start : 'tenv -> 'pname -> bool

Loading…
Cancel
Save