[pulse] add HTML debug for various cases of call models

Summary: It's useful to know what happened.

Reviewed By: mbouaziz

Differential Revision: D14324757

fbshipit-source-id: 280d4a282
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent c3cadace86
commit 89bdab173a

@ -6,6 +6,7 @@
*) *)
open! IStd open! IStd
module F = Format module F = Format
module L = Logging
open Result.Monad_infix open Result.Monad_infix
let report summary diagnostic = let report summary diagnostic =
@ -87,6 +88,7 @@ module PulseTransferFunctions = struct
| _ -> | _ ->
Ok astate ) Ok astate )
| Direct callee_pname when Typ.Procname.is_constructor callee_pname -> ( | Direct callee_pname when Typ.Procname.is_constructor callee_pname -> (
L.d_printfln "constructor call detected@." ;
match actuals with match actuals with
| AccessExpression constructor_access :: rest -> | AccessExpression constructor_access :: rest ->
let constructed_object = HilExp.AccessExpression.dereference constructor_access in let constructed_object = HilExp.AccessExpression.dereference constructor_access in
@ -95,6 +97,7 @@ module PulseTransferFunctions = struct
Ok astate ) Ok astate )
| Direct (Typ.Procname.ObjC_Cpp callee_pname) | Direct (Typ.Procname.ObjC_Cpp callee_pname)
when Typ.Procname.ObjC_Cpp.is_operator_equal callee_pname -> ( when Typ.Procname.ObjC_Cpp.is_operator_equal callee_pname -> (
L.d_printfln "operator= detected@." ;
match actuals with match actuals with
(* We want to assign *lhs to *rhs when rhs is materialized temporary created in constructor *) (* We want to assign *lhs to *rhs when rhs is materialized temporary created in constructor *)
| [AccessExpression lhs; HilExp.AccessExpression (AddressOf (Base rhs_base as rhs_exp))] | [AccessExpression lhs; HilExp.AccessExpression (AddressOf (Base rhs_base as rhs_exp))]
@ -110,6 +113,7 @@ module PulseTransferFunctions = struct
| _ -> | _ ->
read_all actuals astate ) read_all actuals astate )
| _ -> | _ ->
L.d_printfln "skipping unknown procedure@." ;
read_all actuals astate read_all actuals astate

Loading…
Cancel
Save