Module Clang.Decl
AST declarations.
type t
= Ast.decl
val of_cxcursor : ?options:Ast.Options.t -> Clang__.Clang__bindings.cxcursor -> t
of_cxcursor ?options cu
translatescu
into its high-level representation, supposing thatcu
points to a declaration.
val get_typedef_underlying_type : ?options:Ast.Options.t -> ?recursive:bool -> t -> Type.t
get_typedef_underlying_type ?options ?recursive decl
returns the underlying type of a typedefdecl
. Ifrecursive
istrue
(default:false
), typedefs are followed until the underlying type is not a typedef.
val get_field_bit_width : t -> int
get_field_bit_width d
returns the bit width of the field declarationd
.
val get_size_expr : ?options:Ast.Options.t -> t -> Expr.t
get_size_expr ?options d
returns the expression specifying the size of the array declared byd
, and fails ifd
is not an array declaration.
val get_type_loc : ?options:Ast.Options.t -> t -> Type_loc.t
val get_canonical : t -> Clang__.Clang__bindings.cxcursor
get_canonical d
retrieves the canonical cursor declaring an entity.