On Tue, Mar 18, 2025 at 11:27:07AM +0530, Tejas Belagod wrote:
> Add a function to traverse down the pointer layers to the pointee type.
> 
> gcc/ChangeLog:
>       * tree.h (strip_pointer_types): New.
> ---
>  gcc/tree.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/gcc/tree.h b/gcc/tree.h
> index 6f45359f103..77eddc4515c 100644
> --- a/gcc/tree.h
> +++ b/gcc/tree.h
> @@ -5047,6 +5047,15 @@ strip_array_types (tree type)
>    return type;
>  }
>  

Please add a function comment for this, similarly how strip_array_types
has one.

> +inline const_tree
> +strip_pointer_types (const_tree type)
> +{
> +  while (POINTER_TYPE_P (type))
> +    type = TREE_TYPE (type);
> +
> +  return type;
> +}
> +

Ok with that nit fixed.

        Jakub

Reply via email to