23 static bool is_array(
const tree_t *type)
28 static bool is_pointer(
const tree_t *type)
33 static bool is_opaque(
const tree_t *type)
49 if (is_array(inner) && is_pointer(dst))
59 if (is_array(dst) && is_pointer(inner))
67 if (is_array(dst) && is_array(inner))
78 if (is_pointer(dst) && is_opaque(inner))
CT_PUREFN CT_TREE_API const node_t * tree_get_node(const tree_t *tree)
CT_PUREFN CT_TREE_API const char * tree_get_name(const tree_t *tree)
CT_PUREFN CT_TREE_API const tree_t * tree_get_type(const tree_t *tree)
CT_PUREFN CT_TREE_API bool tree_is(const tree_t *self, tree_kind_t kind)
CT_PUREFN CT_TREE_API const tree_t * tree_ty_load_type(const tree_t *self)
get the type of a type after it has been loaded
#define CT_UNUSED(x)
mark a variable as unused
#define CTASSERT(expr)
assert a condition, prints the condition as a message
#define CTASSERTF(expr,...)
assert a condition with a message and optional format arguments
CT_BEGIN_API CT_UTIL_API bool util_types_equal(const tree_t *lhs, const tree_t *rhs)
compare two types for strict equality compares two types for exact equality, does not follow typedefs
CT_UTIL_API bool util_type_is_digit(const tree_t *type)
CT_TREE_API tree_t * tree_expr_cast(const node_t *node, const tree_t *type, const tree_t *expr, tree_cast_t cast)
create a cast expression
CT_TREE_API tree_t * tree_type_pointer(const node_t *node, const char *name, const tree_t *pointer, size_t length)
create a pointer type
CT_TREE_API const tree_t * tree_follow_type(const tree_t *type)
tree_t * ctu_cast_type(tree_t *sema, tree_t *expr, const tree_t *dst)
ctu_t * begin_resolve(tree_t *sema, tree_t *self, void *user, ctu_kind_t kind)