ClangFrontend.CAst_utils
Functions for transformations of ast nodes
val dummy_source_range : unit -> ATDGenerated.Clang_ast_t.source_range
val dummy_stmt_info : unit -> ATDGenerated.Clang_ast_t.stmt_info
val get_fresh_pointer : unit -> ATDGenerated.Clang_ast_t.pointer
val get_decl :
ATDGenerated.Clang_ast_t.pointer ->
ATDGenerated.Clang_ast_t.decl option
val get_decl_opt :
ATDGenerated.Clang_ast_t.pointer option ->
ATDGenerated.Clang_ast_t.decl option
val get_stmt :
ATDGenerated.Clang_ast_t.pointer ->
ATDGenerated.Clang_ast_t.source_range ->
ATDGenerated.Clang_ast_t.stmt option
val get_stmt_exn :
ATDGenerated.Clang_ast_t.pointer ->
ATDGenerated.Clang_ast_t.source_range ->
ATDGenerated.Clang_ast_t.stmt
val get_stmt_opt :
ATDGenerated.Clang_ast_t.pointer option ->
ATDGenerated.Clang_ast_t.source_range ->
ATDGenerated.Clang_ast_t.stmt option
val get_decl_opt_with_decl_ref :
ATDGenerated.Clang_ast_t.decl_ref ->
ATDGenerated.Clang_ast_t.decl option
val get_decl_opt_with_decl_ref_opt :
ATDGenerated.Clang_ast_t.decl_ref option ->
ATDGenerated.Clang_ast_t.decl option
val update_sil_types_map :
ATDGenerated.Clang_ast_t.type_ptr ->
IR.Typ.desc ->
unit
val update_enum_map_exn : ATDGenerated.Clang_ast_t.pointer -> IR.Exp.t -> unit
val add_enum_constant :
ATDGenerated.Clang_ast_t.pointer ->
ATDGenerated.Clang_ast_t.pointer option ->
unit
val get_enum_constant_exp_exn :
ATDGenerated.Clang_ast_t.pointer ->
ATDGenerated.Clang_ast_t.pointer option * IR.Exp.t option
val get_qualified_name :
?linters_mode:bool ->
ATDGenerated.Clang_ast_t.named_decl_info ->
IR.QualifiedCppName.t
returns sanitized, fully qualified name given name info
val get_unqualified_name : ATDGenerated.Clang_ast_t.named_decl_info -> string
returns sanitized unqualified name given name info
val get_class_name_from_member :
ATDGenerated.Clang_ast_t.named_decl_info ->
IR.QualifiedCppName.t
returns qualified class name given member name info
val get_type :
ATDGenerated.Clang_ast_t.type_ptr ->
ATDGenerated.Clang_ast_t.c_type option
looks up clang pointer to type and returns c_type. It requires type_ptr to be `TPtr.
val get_desugared_type :
ATDGenerated.Clang_ast_t.type_ptr ->
ATDGenerated.Clang_ast_t.c_type option
looks up clang pointer to type and resolves any sugar around it. See get_type for more info and restrictions
val get_decl_from_typ_ptr :
ATDGenerated.Clang_ast_t.type_ptr ->
ATDGenerated.Clang_ast_t.decl option
returns declaration of the type for certain types (RecordType, ObjCInterfaceType and None for others
type qual_type_to_sil_type =
IR.Tenv.t ->
ATDGenerated.Clang_ast_t.qual_type ->
IR.Typ.t
type procname_from_decl =
?tenv:IR.Tenv.t ->
?block_return_type:ATDGenerated.Clang_ast_t.qual_type ->
?outer_proc:IR.Procname.t ->
ATDGenerated.Clang_ast_t.decl ->
IR.Procname.t
val qual_type_of_decl_ptr :
ATDGenerated.Clang_ast_t.pointer ->
ATDGenerated.Clang_ast_t.qual_type
val add_type_from_decl_ref_opt :
qual_type_to_sil_type ->
IR.Tenv.t ->
ATDGenerated.Clang_ast_t.decl_ref option ->
bool ->
unit
val add_type_from_decl_ref_list :
qual_type_to_sil_type ->
IR.Tenv.t ->
ATDGenerated.Clang_ast_t.decl_ref list ->
unit
val get_function_decl_with_body :
ATDGenerated.Clang_ast_t.pointer ->
ATDGenerated.Clang_ast_t.decl option
val get_info_from_decl_ref :
ATDGenerated.Clang_ast_t.decl_ref ->
ATDGenerated.Clang_ast_t.named_decl_info
* ATDGenerated.Clang_ast_t.pointer
* ATDGenerated.Clang_ast_t.qual_type
val sil_annot_of_type : ATDGenerated.Clang_ast_t.qual_type -> IR.Annot.Item.t
val type_of_decl :
ATDGenerated.Clang_ast_t.decl ->
ATDGenerated.Clang_ast_t.type_ptr option
val get_record_fields :
ATDGenerated.Clang_ast_t.decl ->
ATDGenerated.Clang_ast_t.decl list
val get_cxx_base_classes :
ATDGenerated.Clang_ast_t.decl ->
ATDGenerated.Clang_ast_t.type_ptr list
val get_cxx_virtual_base_classes :
ATDGenerated.Clang_ast_t.decl ->
ATDGenerated.Clang_ast_t.type_ptr list
val is_no_escape_block_arg : ATDGenerated.Clang_ast_t.decl -> bool
val is_cpp_implicit_decl : ATDGenerated.Clang_ast_t.decl -> bool
val get_superclass_curr_class_objc_from_decl :
ATDGenerated.Clang_ast_t.decl ->
ATDGenerated.Clang_ast_t.decl_ref option
val get_captured_mode :
lci_capture_this:bool ->
lci_capture_kind:
[< `LCK_ByCopy | `LCK_ByRef | `LCK_StarThis | `LCK_This | `LCK_VLAType ] ->
IR.CapturedVar.capture_mode
val create_objc_block_name :
ATDGenerated.Clang_ast_t.decl_info ->
ATDGenerated.Clang_ast_t.block_decl_info ->
string * string