|
|
|
@ -6,6 +6,7 @@
|
|
|
|
|
*)
|
|
|
|
|
open! IStd
|
|
|
|
|
module F = Format
|
|
|
|
|
module L = Logging
|
|
|
|
|
open Result.Monad_infix
|
|
|
|
|
|
|
|
|
|
let report summary diagnostic =
|
|
|
|
@ -87,6 +88,7 @@ module PulseTransferFunctions = struct
|
|
|
|
|
| _ ->
|
|
|
|
|
Ok astate )
|
|
|
|
|
| Direct callee_pname when Typ.Procname.is_constructor callee_pname -> (
|
|
|
|
|
L.d_printfln "constructor call detected@." ;
|
|
|
|
|
match actuals with
|
|
|
|
|
| AccessExpression constructor_access :: rest ->
|
|
|
|
|
let constructed_object = HilExp.AccessExpression.dereference constructor_access in
|
|
|
|
@ -95,6 +97,7 @@ module PulseTransferFunctions = struct
|
|
|
|
|
Ok astate )
|
|
|
|
|
| Direct (Typ.Procname.ObjC_Cpp callee_pname)
|
|
|
|
|
when Typ.Procname.ObjC_Cpp.is_operator_equal callee_pname -> (
|
|
|
|
|
L.d_printfln "operator= detected@." ;
|
|
|
|
|
match actuals with
|
|
|
|
|
(* 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))]
|
|
|
|
@ -110,6 +113,7 @@ module PulseTransferFunctions = struct
|
|
|
|
|
| _ ->
|
|
|
|
|
read_all actuals astate )
|
|
|
|
|
| _ ->
|
|
|
|
|
L.d_printfln "skipping unknown procedure@." ;
|
|
|
|
|
read_all actuals astate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|