[fcp] Add ooti_ prefix to objc_object_type_info type

Summary:
This is due to the changes in `facebook-clang-plugins` where objc_object_type_info now has a `field_prefix` set to `ooti_`
See 5f2042abe6 for the changes made to `facebook-clang-plugins`

update-submodule: facebook-clang-plugins

Reviewed By: jvillard

Differential Revision: D5963064

fbshipit-source-id: 9705774
master
Martino Luca 7 years ago committed by Facebook Github Bot
parent c9be3c9f94
commit 7bd2cedb1d

@ -1 +1 @@
Subproject commit a96c39601fb42c040161f5936107c92a38d83124
Subproject commit 5f2042abe6cf15e2a17741259fa08c55bf61fb1b

@ -647,12 +647,12 @@ let has_type_subprotocol_of an _prot_name =
| Some ObjCObjectPointerType (_, qt)
-> check_subprotocol (CAst_utils.get_type qt.qt_type_ptr)
| Some ObjCObjectType (_, ooti)
-> if List.length ooti.protocol_decls_ptr > 0 then
check_protocol_hiearachy ooti.protocol_decls_ptr _prot_name
-> if List.length ooti.ooti_protocol_decls_ptr > 0 then
check_protocol_hiearachy ooti.ooti_protocol_decls_ptr _prot_name
else
List.exists
~f:(fun qt -> check_subprotocol (CAst_utils.get_type qt.qt_type_ptr))
ooti.type_args
ooti.ooti_type_args
| Some ObjCInterfaceType (_, pt)
-> check_protocol_hiearachy [pt] _prot_name
| _

@ -115,7 +115,7 @@ and type_desc_of_c_type translate_decl tenv c_type : Typ.desc =
if Typ.equal_desc desc (get_builtin_objc_type `ObjCClass) then desc
else Typ.Tptr (typ, Typ.Pk_pointer)
| ObjCObjectType (_, objc_object_type_info)
-> type_ptr_to_type_desc translate_decl tenv objc_object_type_info.Clang_ast_t.base_type
-> type_ptr_to_type_desc translate_decl tenv objc_object_type_info.Clang_ast_t.ooti_base_type
| BlockPointerType (_, qual_type)
-> let typ = qual_type_to_sil_type translate_decl tenv qual_type in
Typ.Tptr (typ, Typ.Pk_pointer)

@ -415,11 +415,14 @@ and objc_object_type_equal c_type abs_ctype =
in
match (c_type, abs_ctype) with
| ObjCObjectType (_, ooti), ObjCGenProt (base, args) -> (
match (CAst_utils.get_type ooti.base_type, ooti.protocol_decls_ptr, ooti.type_args) with
match
(CAst_utils.get_type ooti.ooti_base_type, ooti.ooti_protocol_decls_ptr, ooti.ooti_type_args)
with
| Some base_type, _ :: _, []
-> c_type_equal base_type base && List.for_all ~f:(check_prot args) ooti.protocol_decls_ptr
-> c_type_equal base_type base
&& List.for_all ~f:(check_prot args) ooti.ooti_protocol_decls_ptr
| Some base_type, [], _ :: _
-> c_type_equal base_type base && List.for_all ~f:(check_type_args args) ooti.type_args
-> c_type_equal base_type base && List.for_all ~f:(check_type_args args) ooti.ooti_type_args
| _
-> false )
| _

Loading…
Cancel
Save