@ -108,8 +108,9 @@ module C = struct
PulseOperations . allocate callee_procname location ret_value astate
PulseOperations . allocate callee_procname location ret_value astate
| > PulseArithmetic . and_positive ret_addr
| > PulseArithmetic . and_positive ret_addr
| > PulseOperations . ok_continue
| > PulseOperations . ok_continue
end
module ObjCCoreFoundation = struct
let cf_bridging_release access : model =
let cf_bridging_release access : model =
fun _ ~ callee_procname : _ _ ~ ret : ( ret_id , _ ) astate ->
fun _ ~ callee_procname : _ _ ~ ret : ( ret_id , _ ) astate ->
let astate = PulseOperations . write_id ret_id access astate in
let astate = PulseOperations . write_id ret_id access astate in
@ -622,160 +623,179 @@ module ProcNameDispatcher = struct
StringSet . of_list
StringSet . of_list
[ " add " ; " addAll " ; " append " ; " delete " ; " remove " ; " replace " ; " poll " ; " put " ; " putAll " ]
[ " add " ; " addAll " ; " append " ; " delete " ; " remove " ; " replace " ; " poll " ; " put " ; " putAll " ]
in
in
let transfer_ownership_matchers =
let transfer_ownership_namespace_matchers =
List . map
~ f : ( fun ( namespace , m ) ->
- namespace & :: m $ capt_arg_payload $+ .. . $- -> ObjCCoreFoundation . cf_bridging_release )
Config . pulse_model_transfer_ownership_namespace
in
let transfer_ownership_name_matchers =
List . map
~ f : ( fun m -> - m $ capt_arg_payload $+ .. . $- -> ObjCCoreFoundation . cf_bridging_release )
Config . pulse_model_transfer_ownership
in
transfer_ownership_namespace_matchers @ transfer_ownership_name_matchers
in
make_dispatcher
make_dispatcher
[ + match_builtin BuiltinDecl . free < > $ capt_arg_payload $- -> C . free
( transfer_ownership_matchers
; + match_builtin BuiltinDecl . malloc < > $ capt_arg_payload $- -> C . malloc
@ [ + match_builtin BuiltinDecl . free < > $ capt_arg_payload $- -> C . free
; + match_builtin BuiltinDecl . __delete < > $ capt_arg_payload $- -> Cplusplus . delete
; + match_builtin BuiltinDecl . malloc < > $ capt_arg_payload $- -> C . malloc
; + match_builtin BuiltinDecl . __placement_new & + + > Cplusplus . placement_new
; + match_builtin BuiltinDecl . __delete < > $ capt_arg_payload $- -> Cplusplus . delete
; + match_builtin BuiltinDecl . objc_cpp_throw < > - -> Misc . early_exit
; + match_builtin BuiltinDecl . __placement_new & + + > Cplusplus . placement_new
; + match_builtin BuiltinDecl . __cast < > $ capt_arg_payload $+ .. . $- -> Misc . id_first_arg
; + match_builtin BuiltinDecl . objc_cpp_throw < > - -> Misc . early_exit
; + match_builtin BuiltinDecl . abort < > - -> Misc . early_exit
; + match_builtin BuiltinDecl . __cast < > $ capt_arg_payload $+ .. . $- -> Misc . id_first_arg
; + match_builtin BuiltinDecl . exit < > - -> Misc . early_exit
; + match_builtin BuiltinDecl . abort < > - -> Misc . early_exit
; + match_builtin BuiltinDecl . __infer_initializer_list
; + match_builtin BuiltinDecl . exit < > - -> Misc . early_exit
< > $ capt_arg_payload $+ .. . $- -> Misc . id_first_arg
; + match_builtin BuiltinDecl . __infer_initializer_list
; + PatternMatch . implements_lang " System " & :: " exit " < > - -> Misc . early_exit
< > $ capt_arg_payload $+ .. . $- -> Misc . id_first_arg
; + match_builtin BuiltinDecl . __get_array_length < > - -> Misc . return_unknown_size
; + PatternMatch . implements_lang " System " & :: " exit " < > - -> Misc . early_exit
; (* consider that all fbstrings are small strings to avoid false positives due to manual
; + match_builtin BuiltinDecl . __get_array_length < > - -> Misc . return_unknown_size
ref - counting * )
; (* consider that all fbstrings are small strings to avoid false positives due to manual
- " folly " & :: " fbstring_core " & :: " category " & - -> Misc . return_int Int64 . zero
ref - counting * )
; - " folly " & :: " DelayedDestruction " & :: " destroy " & - -> Misc . skip
- " folly " & :: " fbstring_core " & :: " category " & - -> Misc . return_int Int64 . zero
; - " folly " & :: " Optional " & :: " reset " & - -> Misc . skip
; - " folly " & :: " DelayedDestruction " & :: " destroy " & - -> Misc . skip
; - " folly " & :: " SocketAddress " & :: " ~SocketAddress " & - -> Misc . skip
; - " folly " & :: " Optional " & :: " reset " & - -> Misc . skip
; - " std " & :: " basic_string " & :: " data " < > $ capt_arg_payload $- -> StdBasicString . data
; - " folly " & :: " SocketAddress " & :: " ~SocketAddress " & - -> Misc . skip
; - " std " & :: " basic_string " & :: " ~basic_string " < > $ capt_arg_payload
; - " std " & :: " basic_string " & :: " data " < > $ capt_arg_payload $- -> StdBasicString . data
$- -> StdBasicString . destructor
; - " std " & :: " basic_string " & :: " ~basic_string " < > $ capt_arg_payload
; - " std " & :: " function " & :: " operator() " $ capt_arg_payload $+ + $- -> StdFunction . operator_call
$- -> StdBasicString . destructor
; - " std " & :: " function " & :: " operator= " $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " function " & :: " operator() " $ capt_arg_payload
$- -> Misc . shallow_copy " std::function::operator= "
$+ + $- -> StdFunction . operator_call
; + PatternMatch . implements_lang " Object " & :: " clone " $ capt_arg_payload $- -> JavaObject . clone
; - " std " & :: " function " & :: " operator= " $ capt_arg_payload $+ capt_arg_payload
; ( + PatternMatch . implements_lang " System "
$- -> Misc . shallow_copy " std::function::operator= "
& :: " arraycopy " $ capt_arg_payload $+ any_arg $+ capt_arg_payload
; + PatternMatch . implements_lang " Object "
$+ .. . $- -> fun src dest -> Misc . shallow_copy " System.arraycopy " dest src )
& :: " clone " $ capt_arg_payload $- -> JavaObject . clone
; - " std " & :: " atomic " & :: " atomic " < > $ capt_arg_payload $+ capt_arg_payload
; ( + PatternMatch . implements_lang " System "
$- -> StdAtomicInteger . constructor
& :: " arraycopy " $ capt_arg_payload $+ any_arg $+ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " fetch_add " < > $ capt_arg_payload $+ capt_arg_payload
$+ .. . $- -> fun src dest -> Misc . shallow_copy " System.arraycopy " dest src )
$+ capt_arg_payload $- -> StdAtomicInteger . fetch_add
; - " std " & :: " atomic " & :: " atomic " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " fetch_sub " < > $ capt_arg_payload $+ capt_arg_payload
$- -> StdAtomicInteger . constructor
$+ capt_arg_payload $- -> StdAtomicInteger . fetch_sub
; - " std " & :: " __atomic_base " & :: " fetch_add " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " exchange " < > $ capt_arg_payload $+ capt_arg_payload
$+ capt_arg_payload $- -> StdAtomicInteger . fetch_add
$+ capt_arg_payload $- -> StdAtomicInteger . exchange
; - " std " & :: " __atomic_base " & :: " fetch_sub " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " load " < > $ capt_arg_payload $+ ? capt_arg_payload
$+ capt_arg_payload $- -> StdAtomicInteger . fetch_sub
$- -> StdAtomicInteger . load
; - " std " & :: " __atomic_base " & :: " exchange " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " store " < > $ capt_arg_payload $+ capt_arg_payload
$+ capt_arg_payload $- -> StdAtomicInteger . exchange
$+ capt_arg_payload $- -> StdAtomicInteger . store
; - " std " & :: " __atomic_base " & :: " load " < > $ capt_arg_payload $+ ? capt_arg_payload
; - " std " & :: " __atomic_base " & :: " operator++ " < > $ capt_arg_payload
$- -> StdAtomicInteger . load
$- -> StdAtomicInteger . operator_plus_plus_pre
; - " std " & :: " __atomic_base " & :: " store " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " operator++ " < > $ capt_arg_payload $+ capt_arg_payload
$+ capt_arg_payload $- -> StdAtomicInteger . store
$- -> StdAtomicInteger . operator_plus_plus_post
; - " std " & :: " __atomic_base " & :: " operator++ " < > $ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " operator-- " < > $ capt_arg_payload
$- -> StdAtomicInteger . operator_plus_plus_pre
$- -> StdAtomicInteger . operator_minus_minus_pre
; - " std " & :: " __atomic_base " & :: " operator++ " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " __atomic_base " & :: " operator-- " < > $ capt_arg_payload $+ capt_arg_payload
$- -> StdAtomicInteger . operator_plus_plus_post
$- -> StdAtomicInteger . operator_minus_minus_post
; - " std " & :: " __atomic_base " & :: " operator-- " < > $ capt_arg_payload
; - " std " & :: " __atomic_base "
$- -> StdAtomicInteger . operator_minus_minus_pre
& :: + ( fun _ name -> String . is_prefix ~ prefix : " operator_ " name )
; - " std " & :: " __atomic_base " & :: " operator-- " < > $ capt_arg_payload $+ capt_arg_payload
< > $ capt_arg_payload $+ ? capt_arg_payload $- -> StdAtomicInteger . operator_t
$- -> StdAtomicInteger . operator_minus_minus_post
; - " std " & :: " integral_constant " < any_typ & + capt_int
; - " std " & :: " __atomic_base "
> :: + ( fun _ name -> String . is_prefix ~ prefix : " operator_ " name )
& :: + ( fun _ name -> String . is_prefix ~ prefix : " operator_ " name )
< > - -> Misc . return_int
< > $ capt_arg_payload $+ ? capt_arg_payload $- -> StdAtomicInteger . operator_t
; - " std " & :: " vector " & :: " vector " < > $ capt_arg_payload
; - " std " & :: " integral_constant " < any_typ & + capt_int
$+ capt_arg_payload_of_typ ( - " std " & :: " initializer_list " )
> :: + ( fun _ name -> String . is_prefix ~ prefix : " operator_ " name )
$+ .. . $- -> StdVector . init_list_constructor
< > - -> Misc . return_int
; - " std " & :: " __wrap_iter " & :: " __wrap_iter " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " vector " & :: " vector " < > $ capt_arg_payload
$+ .. . $- -> GenericArrayBackedCollectionIterator . constructor ~ desc : " iterator constructor "
$+ capt_arg_payload_of_typ ( - " std " & :: " initializer_list " )
; - " std " & :: " __wrap_iter " & :: " operator* " < > $ capt_arg_payload
$+ .. . $- -> StdVector . init_list_constructor
$- -> GenericArrayBackedCollectionIterator . operator_star ~ desc : " iterator operator* "
; - " std " & :: " __wrap_iter " & :: " __wrap_iter " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " __wrap_iter " & :: " operator++ " < > $ capt_arg_payload
$+ .. . $- -> GenericArrayBackedCollectionIterator . constructor ~ desc : " iterator constructor "
$- -> GenericArrayBackedCollectionIterator . operator_step ` PlusPlus
; - " std " & :: " __wrap_iter " & :: " operator* " < > $ capt_arg_payload
~ desc : " iterator operator++ "
$- -> GenericArrayBackedCollectionIterator . operator_star ~ desc : " iterator operator* "
; - " std " & :: " __wrap_iter " & :: " operator-- " < > $ capt_arg_payload
; - " std " & :: " __wrap_iter " & :: " operator++ " < > $ capt_arg_payload
$- -> GenericArrayBackedCollectionIterator . operator_step ` MinusMinus
$- -> GenericArrayBackedCollectionIterator . operator_step ` PlusPlus
~ desc : " iterator operator-- "
~ desc : " iterator operator++ "
; - " __gnu_cxx " & :: " __normal_iterator " & :: " __normal_iterator " < > $ capt_arg_payload
; - " std " & :: " __wrap_iter " & :: " operator-- " < > $ capt_arg_payload
$+ capt_arg_payload
$- -> GenericArrayBackedCollectionIterator . operator_step ` MinusMinus
$+ .. . $- -> GenericArrayBackedCollectionIterator . constructor ~ desc : " iterator constructor "
~ desc : " iterator operator-- "
; - " __gnu_cxx " & :: " __normal_iterator " & :: " operator* " < > $ capt_arg_payload
; - " __gnu_cxx " & :: " __normal_iterator " & :: " __normal_iterator " < > $ capt_arg_payload
$- -> GenericArrayBackedCollectionIterator . operator_star ~ desc : " iterator operator* "
$+ capt_arg_payload
; - " __gnu_cxx " & :: " __normal_iterator " & :: " operator++ " < > $ capt_arg_payload
$+ .. . $- -> GenericArrayBackedCollectionIterator . constructor ~ desc : " iterator constructor "
$- -> GenericArrayBackedCollectionIterator . operator_step ` PlusPlus
; - " __gnu_cxx " & :: " __normal_iterator " & :: " operator* " < > $ capt_arg_payload
~ desc : " iterator operator++ "
$- -> GenericArrayBackedCollectionIterator . operator_star ~ desc : " iterator operator* "
; - " __gnu_cxx " & :: " __normal_iterator " & :: " operator-- " < > $ capt_arg_payload
; - " __gnu_cxx " & :: " __normal_iterator " & :: " operator++ " < > $ capt_arg_payload
$- -> GenericArrayBackedCollectionIterator . operator_step ` MinusMinus
$- -> GenericArrayBackedCollectionIterator . operator_step ` PlusPlus
~ desc : " iterator operator-- "
~ desc : " iterator operator++ "
; - " std " & :: " vector " & :: " assign " < > $ capt_arg_payload
; - " __gnu_cxx " & :: " __normal_iterator " & :: " operator-- " < > $ capt_arg_payload
$+ .. . $- -> StdVector . invalidate_references Assign
$- -> GenericArrayBackedCollectionIterator . operator_step ` MinusMinus
; - " std " & :: " vector " & :: " at " < > $ capt_arg_payload $+ capt_arg_payload
~ desc : " iterator operator-- "
$- -> StdVector . at ~ desc : " std::vector::at() "
; - " std " & :: " vector " & :: " assign " < > $ capt_arg_payload
; - " std " & :: " vector " & :: " begin " < > $ capt_arg_payload $+ capt_arg_payload
$+ .. . $- -> StdVector . invalidate_references Assign
$- -> StdVector . vector_begin
; - " std " & :: " vector " & :: " at " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " vector " & :: " end " < > $ capt_arg_payload $+ capt_arg_payload
$- -> StdVector . at ~ desc : " std::vector::at() "
$- -> StdVector . vector_end
; - " std " & :: " vector " & :: " begin " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " vector " & :: " clear " < > $ capt_arg_payload
$- -> StdVector . vector_begin
$- -> StdVector . invalidate_references Clear
; - " std " & :: " vector " & :: " end " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " vector " & :: " emplace " $ capt_arg_payload
$- -> StdVector . vector_end
$+ .. . $- -> StdVector . invalidate_references Emplace
; - " std " & :: " vector " & :: " clear " < > $ capt_arg_payload
; - " std " & :: " vector " & :: " emplace_back " $ capt_arg_payload
$- -> StdVector . invalidate_references Clear
$+ .. . $- -> StdVector . invalidate_references EmplaceBack
; - " std " & :: " vector " & :: " emplace " $ capt_arg_payload
; - " std " & :: " vector " & :: " insert " < > $ capt_arg_payload
$+ .. . $- -> StdVector . invalidate_references Emplace
$+ .. . $- -> StdVector . invalidate_references Insert
; - " std " & :: " vector " & :: " emplace_back " $ capt_arg_payload
; - " std " & :: " vector " & :: " operator[] " < > $ capt_arg_payload $+ capt_arg_payload
$+ .. . $- -> StdVector . invalidate_references EmplaceBack
$- -> StdVector . at ~ desc : " std::vector::at() "
; - " std " & :: " vector " & :: " insert " < > $ capt_arg_payload
; - " std " & :: " vector " & :: " shrink_to_fit " < > $ capt_arg_payload
$+ .. . $- -> StdVector . invalidate_references Insert
$- -> StdVector . invalidate_references ShrinkToFit
; - " std " & :: " vector " & :: " operator[] " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " vector " & :: " push_back " < > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
$- -> StdVector . at ~ desc : " std::vector::at() "
; + PatternMatch . implements_collection
; - " std " & :: " vector " & :: " shrink_to_fit " < > $ capt_arg_payload
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
$- -> StdVector . invalidate_references ShrinkToFit
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
; - " std " & :: " vector " & :: " push_back " < > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
; + PatternMatch . implements_queue
; + PatternMatch . implements_collection
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
; + PatternMatch . implements_lang " StringBuilder "
; + PatternMatch . implements_queue
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
; + PatternMatch . implements_lang " StringBuilder "
; + PatternMatch . implements_lang " StringBuilder "
& :: " setLength " < > $ capt_arg_payload
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
$+ .. . $- -> StdVector . invalidate_references ShrinkToFit
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
; + PatternMatch . implements_lang " String "
; + PatternMatch . implements_lang " StringBuilder "
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
& :: " setLength " < > $ capt_arg_payload
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
$+ .. . $- -> StdVector . invalidate_references ShrinkToFit
; + PatternMatch . implements_iterator & :: " remove " < > $ capt_arg_payload
; + PatternMatch . implements_lang " String "
$+ .. . $- -> JavaIterator . remove ~ desc : " remove "
& :: + ( fun _ str -> StringSet . mem str pushback_modeled )
; + PatternMatch . implements_map & :: " put " < > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
< > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
; + PatternMatch . implements_map & :: " putAll " < > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
; + PatternMatch . implements_iterator & :: " remove " < > $ capt_arg_payload
; - " std " & :: " vector " & :: " reserve " < > $ capt_arg_payload $+ .. . $- -> StdVector . reserve
$+ .. . $- -> JavaIterator . remove ~ desc : " remove "
; + PatternMatch . implements_collection
; + PatternMatch . implements_map & :: " put " < > $ capt_arg_payload $+ .. . $- -> StdVector . push_back
& :: " get " < > $ capt_arg_payload $+ capt_arg_payload
; + PatternMatch . implements_map & :: " putAll " < > $ capt_arg_payload
$- -> StdVector . at ~ desc : " Collection.get() "
$+ .. . $- -> StdVector . push_back
; + PatternMatch . implements_list & :: " set " < > $ capt_arg_payload $+ capt_arg_payload
; - " std " & :: " vector " & :: " reserve " < > $ capt_arg_payload $+ .. . $- -> StdVector . reserve
$+ capt_arg_payload $- -> JavaCollection . set
; + PatternMatch . implements_collection
; + PatternMatch . implements_iterator & :: " hasNext "
& :: " get " < > $ capt_arg_payload $+ capt_arg_payload
& - -> Misc . nondet ~ fn_name : " Iterator.hasNext() "
$- -> StdVector . at ~ desc : " Collection.get() "
; + PatternMatch . implements_enumeration
; + PatternMatch . implements_list & :: " set " < > $ capt_arg_payload $+ capt_arg_payload
& :: " hasMoreElements "
$+ capt_arg_payload $- -> JavaCollection . set
& - -> Misc . nondet ~ fn_name : " Enumeration.hasMoreElements() "
; + PatternMatch . implements_iterator & :: " hasNext "
; + PatternMatch . implements_lang " Object "
& - -> Misc . nondet ~ fn_name : " Iterator.hasNext() "
& :: " equals "
; + PatternMatch . implements_enumeration
& - -> Misc . nondet ~ fn_name : " Object.equals "
& :: " hasMoreElements "
; + PatternMatch . implements_lang " Iterable "
& - -> Misc . nondet ~ fn_name : " Enumeration.hasMoreElements() "
& :: " iterator " < > $ capt_arg_payload
; + PatternMatch . implements_lang " Object "
$+ .. . $- -> JavaIterator . constructor ~ desc : " Iterable.iterator "
& :: " equals "
; + PatternMatch . implements_iterator & :: " next " < > $ capt_arg_payload
& - -> Misc . nondet ~ fn_name : " Object.equals "
$! - -> JavaIterator . next ~ desc : " Iterator.next() "
; + PatternMatch . implements_lang " Iterable "
; ( + PatternMatch . implements_enumeration
& :: " iterator " < > $ capt_arg_payload
& :: " nextElement " < > $ capt_arg_payload
$+ .. . $- -> JavaIterator . constructor ~ desc : " Iterable.iterator "
$! - -> fun x -> StdVector . at ~ desc : " Enumeration.nextElement " x ( AbstractValue . mk_fresh () , [] )
; + PatternMatch . implements_iterator & :: " next " < > $ capt_arg_payload
)
$! - -> JavaIterator . next ~ desc : " Iterator.next() "
; + PatternMatch . ObjectiveC . is_core_graphics_create_or_copy & + + > C . malloc
; ( + PatternMatch . implements_enumeration
; + PatternMatch . ObjectiveC . is_core_foundation_create_or_copy & + + > C . malloc
& :: " nextElement " < > $ capt_arg_payload
; + match_builtin BuiltinDecl . malloc_no_fail < > $ capt_arg_payload $- -> C . malloc_not_null
$! - -> fun x ->
; + PatternMatch . ObjectiveC . is_modelled_as_alloc & + + > C . malloc_not_null
StdVector . at ~ desc : " Enumeration.nextElement " x ( AbstractValue . mk_fresh () , [] ) )
; + PatternMatch . ObjectiveC . is_core_graphics_release
; + PatternMatch . ObjectiveC . is_core_graphics_create_or_copy & + + > C . malloc
< > $ capt_arg_payload $- -> C . cf_bridging_release
; + PatternMatch . ObjectiveC . is_core_foundation_create_or_copy & + + > C . malloc
; - " CFRelease " < > $ capt_arg_payload $- -> C . cf_bridging_release
; + match_builtin BuiltinDecl . malloc_no_fail < > $ capt_arg_payload $- -> C . malloc_not_null
; + PatternMatch . ObjectiveC . is_modelled_as_release
; + PatternMatch . ObjectiveC . is_modelled_as_alloc & + + > C . malloc_not_null
< > $ capt_arg_payload $- -> C . cf_bridging_release
; + PatternMatch . ObjectiveC . is_core_graphics_release
; - " CFAutorelease " < > $ capt_arg_payload $- -> C . cf_bridging_release
< > $ capt_arg_payload $- -> ObjCCoreFoundation . cf_bridging_release
; - " CFBridgingRelease " < > $ capt_arg_payload $- -> C . cf_bridging_release
; - " CFRelease " < > $ capt_arg_payload $- -> ObjCCoreFoundation . cf_bridging_release
; + match_builtin BuiltinDecl . __free_cf < > $ capt_arg_payload $- -> C . cf_bridging_release ]
; + PatternMatch . ObjectiveC . is_modelled_as_release
< > $ capt_arg_payload $- -> ObjCCoreFoundation . cf_bridging_release
; - " CFAutorelease " < > $ capt_arg_payload $- -> ObjCCoreFoundation . cf_bridging_release
; - " CFBridgingRelease " < > $ capt_arg_payload $- -> ObjCCoreFoundation . cf_bridging_release
; + match_builtin BuiltinDecl . __free_cf
< > $ capt_arg_payload $- -> ObjCCoreFoundation . cf_bridging_release ] )
end
end
let dispatch tenv proc_name args = ProcNameDispatcher . dispatch tenv proc_name args
let dispatch tenv proc_name args = ProcNameDispatcher . dispatch tenv proc_name args