[clang][frontend] Simplify is_objc_if_descendant logic

Reviewed By: dulmarod

Differential Revision: D3940571

fbshipit-source-id: 6f2edee
master
Ryan Rhee 9 years ago committed by Facebook Github Bot
parent b635269fa8
commit a1f65716b8

@ -455,15 +455,9 @@ struct
match if_decl with match if_decl with
| Some Clang_ast_t.ObjCInterfaceDecl (_, ndi, _, _, _) -> | Some Clang_ast_t.ObjCInterfaceDecl (_, ndi, _, _, _) ->
let in_list some_list = IList.mem string_equal ndi.Clang_ast_t.ni_name some_list in let in_list some_list = IList.mem string_equal ndi.Clang_ast_t.ni_name some_list in
if in_list ancestors then not (in_list blacklist)
true && (in_list ancestors
else if in_list blacklist then || is_objc_if_descendant ~blacklist:blacklist (get_super_if if_decl) ancestors)
false
else
(match get_super_if if_decl with
| Some super_decl ->
is_objc_if_descendant (Some super_decl) ancestors
| None -> false)
| _ -> false | _ -> false
(* (*

Loading…
Cancel
Save