[frontend] Check if a method is a cpp lambda call operator

Summary:
Added a function to check if a method is a cpp lambda call operator that will be used in later diffs

#skipdeadcode

Reviewed By: jvillard

Differential Revision: D23564089

fbshipit-source-id: 144c3d735
master
Daiva Naudziuniene 4 years ago committed by Facebook GitHub Bot
parent d0cb245303
commit 996c1b63e0

@ -92,6 +92,19 @@ let get_method_body method_decl =
raise CFrontend_errors.Invalid_declaration
let is_cpp_lambda_call_operator meth_decl =
let open Clang_ast_t in
match meth_decl with
| CXXMethodDecl (di, _, _, _, _) -> (
match CAst_utils.get_decl_opt di.di_parent_pointer with
| Some (Clang_ast_t.CXXRecordDecl (_, _, _, _, _, _, _, cxx_rdi)) ->
Option.is_some cxx_rdi.xrdi_lambda_call_operator
| _ ->
false )
| _ ->
false
let is_cpp_virtual method_decl =
let open Clang_ast_t in
match method_decl with

@ -19,6 +19,8 @@ val get_param_decls : Clang_ast_t.decl -> Clang_ast_t.decl list
val get_method_body : Clang_ast_t.decl -> Clang_ast_t.stmt option
val is_cpp_lambda_call_operator : Clang_ast_t.decl -> bool
val is_cpp_virtual : Clang_ast_t.decl -> bool
val get_init_list_instrs :

Loading…
Cancel
Save