[linters] Remove redundant predicate

Reviewed By: ddino

Differential Revision: D5029948

fbshipit-source-id: c549c7e
master
Dulma Churchill 8 years ago committed by Facebook Github Bot
parent c9670d215d
commit d04a03b8e3

@ -137,11 +137,11 @@ DEFINE-CHECKER REGISTERED_OBSERVER_BEING_DEALLOCATED = {
DEFINE-CHECKER STRONG_DELEGATE_WARNING = { DEFINE-CHECKER STRONG_DELEGATE_WARNING = {
LET name_contains_delegate = property_named(REGEXP("[dD]elegate")); LET name_contains_delegate = declaration_has_name(REGEXP("[dD]elegate"));
LET name_does_not_contain_delegates = LET name_does_not_contain_delegates =
NOT property_named(REGEXP("[dD]elegates")); NOT declaration_has_name(REGEXP("[dD]elegates"));
LET name_does_not_contains_queue = LET name_does_not_contains_queue =
NOT property_named(REGEXP("[qQ]ueue")); NOT declaration_has_name(REGEXP("[qQ]ueue"));
SET report_when = SET report_when =
WHEN WHEN

@ -141,15 +141,6 @@ let call_instance_method an cname mname =
compare_str_with_alexp omei.omei_selector mname compare_str_with_alexp omei.omei_selector mname
| _ -> false | _ -> false
let property_named an name =
match an with
| Ctl_parser_types.Decl decl ->
(match Clang_ast_proj.get_named_decl_tuple decl with
| Some (_, n) ->
compare_str_with_alexp n.Clang_ast_t.ni_name name
| _ -> false)
| _ -> false
let is_objc_extension lcxt = let is_objc_extension lcxt =
CGeneral_utils.is_objc_extension lcxt.CLintersContext.translation_unit_context CGeneral_utils.is_objc_extension lcxt.CLintersContext.translation_unit_context

@ -21,8 +21,6 @@ val call_instance_method : Ctl_parser_types.ast_node -> ALVar.alexp -> ALVar.al
val is_objc_interface_named : Ctl_parser_types.ast_node -> ALVar.alexp -> bool val is_objc_interface_named : Ctl_parser_types.ast_node -> ALVar.alexp -> bool
val property_named : Ctl_parser_types.ast_node -> ALVar.alexp -> bool
val is_objc_extension : CLintersContext.context -> bool val is_objc_extension : CLintersContext.context -> bool
val is_syntactically_global_var : Ctl_parser_types.ast_node -> bool val is_syntactically_global_var : Ctl_parser_types.ast_node -> bool

@ -626,7 +626,6 @@ let rec eval_Atomic _pred_name args an lcxt =
| "is_strong_property", [], an -> CPredicates.is_strong_property an | "is_strong_property", [], an -> CPredicates.is_strong_property an
| "is_unop_with_kind", [kind], an -> CPredicates.is_unop_with_kind an kind | "is_unop_with_kind", [kind], an -> CPredicates.is_unop_with_kind an kind
| "method_return_type", [typ], an -> CPredicates.method_return_type an typ | "method_return_type", [typ], an -> CPredicates.method_return_type an typ
| "property_named", [word], an -> CPredicates.property_named an word
| "within_responds_to_selector_block", [], an -> | "within_responds_to_selector_block", [], an ->
CPredicates.within_responds_to_selector_block lcxt an CPredicates.within_responds_to_selector_block lcxt an
| _ -> failwith | _ -> failwith

Loading…
Cancel
Save