diff --git a/infer/src/clang/cFrontend_utils.ml b/infer/src/clang/cFrontend_utils.ml index e838089a4..eaa45e4c7 100644 --- a/infer/src/clang/cFrontend_utils.ml +++ b/infer/src/clang/cFrontend_utils.ml @@ -260,9 +260,9 @@ struct let get_decl_from_typ_ptr typ_ptr = let typ_opt = get_desugared_type typ_ptr in let typ = match typ_opt with Some t -> t | _ -> assert false in - (* it needs extending to handle objC types *) match typ with - | Clang_ast_t.RecordType (_, decl_ptr) -> get_decl decl_ptr + | Clang_ast_t.RecordType (_, decl_ptr) + | Clang_ast_t.ObjCInterfaceType (_, decl_ptr) -> get_decl decl_ptr | _ -> None (*TODO take the attributes into account too. To be done after we get the attribute's arguments. *) diff --git a/infer/src/clang/cFrontend_utils.mli b/infer/src/clang/cFrontend_utils.mli index 92bfeb245..b2dac8a18 100644 --- a/infer/src/clang/cFrontend_utils.mli +++ b/infer/src/clang/cFrontend_utils.mli @@ -88,8 +88,8 @@ sig See get_type for more info and restrictions *) val get_desugared_type : Clang_ast_t.type_ptr -> Clang_ast_t.c_type option - (** returns declaration of the type for certain types and crashes for others - NOTE: this function needs extending to handle objC types *) +(** returns declaration of the type for certain types + (RecordType, ObjCInterfaceType and None for others *) val get_decl_from_typ_ptr : Clang_ast_t.type_ptr -> Clang_ast_t.decl option (** returns string representation of type_ptr