Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
thradams committed Mar 22, 2024
1 parent 4133182 commit fcfa543
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/type.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,15 @@ bool type_is_nullptr_t(const struct type* p_type)
return false;
}

bool type_is_pointer_to_out(const struct type* p_type)
{
if (p_type->category == TYPE_CATEGORY_POINTER)
{
return p_type->next->type_qualifier_flags & TYPE_QUALIFIER_OUT;
}
return false;
}

bool type_is_pointer(const struct type* p_type)
{
return p_type->category == TYPE_CATEGORY_POINTER;
Expand Down
1 change: 1 addition & 0 deletions src/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ bool type_is_any_owner(const struct type* p_type);
bool type_is_lvalue(const struct type* p_type);
bool type_is_pointer_to_const(const struct type* p_type);
bool type_is_pointer(const struct type* p_type);
bool type_is_pointer_to_out(const struct type* p_type);
bool type_is_nullptr_t(const struct type* p_type);
bool type_is_void_ptr(const struct type* p_type);
bool type_is_integer(const struct type* p_type);
Expand Down

0 comments on commit fcfa543

Please sign in to comment.