[infer] Get rid of the is_cpp_nothrow field and is_cpp_noexcept_method

Summary: This diff removes a dead field, `is_cpp_nothrow` and `is_cpp_noexcept_method`.

Reviewed By: jvillard

Differential Revision: D19489417

fbshipit-source-id: 971a7f533
master
Sungkeun Cho 5 years ago committed by Facebook Github Bot
parent ce32a1b917
commit 5510223850

@ -47,7 +47,6 @@ type t =
; is_biabduction_model: bool (** the procedure is a model for the biabduction analysis *)
; is_bridge_method: bool (** the procedure is a bridge method *)
; is_defined: bool (** true if the procedure is defined, and not just declared *)
; is_cpp_noexcept_method: bool (** the procedure is an C++ method annotated with "noexcept" *)
; is_java_synchronized_method: bool (** the procedure is a Java synchronized method *)
; is_no_escape_block: bool
(** The procedure is an Objective-C block that has the NS_NOESCAPE attribute *)
@ -75,7 +74,6 @@ let default translation_unit proc_name =
; is_abstract= false
; is_biabduction_model= false
; is_bridge_method= false
; is_cpp_noexcept_method= false
; is_defined= false
; is_java_synchronized_method= false
; is_no_escape_block= false
@ -109,7 +107,6 @@ let pp f
; is_biabduction_model
; is_bridge_method
; is_defined
; is_cpp_noexcept_method
; is_java_synchronized_method
; is_no_escape_block
; is_no_return
@ -149,8 +146,6 @@ let pp f
pp_bool_default ~default:default.is_abstract "is_abstract" is_abstract f () ;
pp_bool_default ~default:default.is_biabduction_model "is_model" is_biabduction_model f () ;
pp_bool_default ~default:default.is_bridge_method "is_bridge_method" is_bridge_method f () ;
pp_bool_default ~default:default.is_cpp_noexcept_method "is_cpp_noexcept_method"
is_cpp_noexcept_method f () ;
pp_bool_default ~default:default.is_defined "is_defined" is_defined f () ;
pp_bool_default ~default:default.is_java_synchronized_method "is_java_synchronized_method"
is_java_synchronized_method f () ;

@ -31,7 +31,6 @@ type t =
; is_biabduction_model: bool (** the procedure is a model for the biabduction analysis *)
; is_bridge_method: bool (** the procedure is a bridge method *)
; is_defined: bool (** true if the procedure is defined, and not just declared *)
; is_cpp_noexcept_method: bool (** the procedure is an C++ method annotated with "noexcept" *)
; is_java_synchronized_method: bool (** the procedure is a Java synchronized method *)
; is_no_escape_block: bool
(** The procedure is an Objective-C block that is passed to a method in a position annotated

@ -104,19 +104,6 @@ let is_cpp_virtual method_decl =
false
let is_cpp_nothrow method_decl =
let open Clang_ast_t in
match method_decl with
| FunctionDecl (_, _, _, fdi)
| CXXMethodDecl (_, _, _, fdi, _)
| CXXConstructorDecl (_, _, _, fdi, _)
| CXXConversionDecl (_, _, _, fdi, _)
| CXXDestructorDecl (_, _, _, fdi, _) ->
fdi.fdi_is_no_throw
| _ ->
false
let get_init_list_instrs method_decl =
let open Clang_ast_t in
match method_decl with

@ -21,8 +21,6 @@ val get_method_body : Clang_ast_t.decl -> Clang_ast_t.stmt option
val is_cpp_virtual : Clang_ast_t.decl -> bool
val is_cpp_nothrow : Clang_ast_t.decl -> bool
val get_init_list_instrs :
Clang_ast_t.decl -> [> `CXXConstructorInit of Clang_ast_t.cxx_ctor_initializer] list

@ -168,7 +168,6 @@ module BuildMethodSignature = struct
let params = get_parameters qual_type_to_sil_type tenv ~block_return_type method_decl in
let attributes = decl_info.Clang_ast_t.di_attributes in
let is_cpp_virtual = CMethodProperties.is_cpp_virtual method_decl in
let is_cpp_nothrow = CMethodProperties.is_cpp_nothrow method_decl in
let is_no_return = CMethodProperties.is_no_return method_decl in
let is_variadic = CMethodProperties.is_variadic method_decl in
let access = decl_info.Clang_ast_t.di_access in
@ -183,7 +182,6 @@ module BuildMethodSignature = struct
; loc
; method_kind
; is_cpp_virtual
; is_cpp_nothrow
; is_no_escape_block
; is_no_return
; is_variadic

@ -35,7 +35,6 @@ type t =
; loc: Clang_ast_t.source_range
; method_kind: ClangMethodKind.t
; is_cpp_virtual: bool
; is_cpp_nothrow: bool
; is_no_escape_block: bool
; is_no_return: bool
; is_variadic: bool
@ -57,9 +56,8 @@ let is_setter {pointer_to_property_opt; params} =
let mk name class_param params ret_type ?(has_added_return_param = false) attributes loc method_kind
?(is_cpp_virtual = false) ?(is_cpp_nothrow = false) ?(is_no_escape_block = false)
?(is_no_return = false) ?(is_variadic = false) pointer_to_parent pointer_to_property_opt
return_param_typ access =
?(is_cpp_virtual = false) ?(is_no_escape_block = false) ?(is_no_return = false)
?(is_variadic = false) pointer_to_parent pointer_to_property_opt return_param_typ access =
{ name
; access
; class_param
@ -70,7 +68,6 @@ let mk name class_param params ret_type ?(has_added_return_param = false) attrib
; loc
; method_kind
; is_cpp_virtual
; is_cpp_nothrow
; is_no_escape_block
; is_no_return
; is_variadic

@ -28,7 +28,6 @@ type t =
; loc: Clang_ast_t.source_range
; method_kind: ClangMethodKind.t
; is_cpp_virtual: bool
; is_cpp_nothrow: bool
; is_no_escape_block: bool
; is_no_return: bool
; is_variadic: bool
@ -51,7 +50,6 @@ val mk :
-> Clang_ast_t.source_range
-> ClangMethodKind.t
-> ?is_cpp_virtual:bool
-> ?is_cpp_nothrow:bool
-> ?is_no_escape_block:bool
-> ?is_no_return:bool
-> ?is_variadic:bool

@ -193,7 +193,6 @@ let create_local_procdesc ?(set_objc_accessor_attr = false) trans_unit_ctx cfg t
let defined = not (List.is_empty fbody) in
let proc_name = ms.CMethodSignature.name in
let clang_method_kind = ms.CMethodSignature.method_kind in
let is_cpp_nothrow = ms.CMethodSignature.is_cpp_nothrow in
let access =
match ms.CMethodSignature.access with
| `None ->
@ -245,7 +244,6 @@ let create_local_procdesc ?(set_objc_accessor_attr = false) trans_unit_ctx cfg t
; has_added_return_param
; access
; is_defined= defined
; is_cpp_noexcept_method= is_cpp_nothrow
; is_biabduction_model= Config.biabduction_models_mode
; is_no_escape_block= ms.CMethodSignature.is_no_escape_block
; is_no_return= ms.CMethodSignature.is_no_return

Loading…
Cancel
Save