Skip to content

Commit

Permalink
[clang][AArch64][SVE] Clarify documentation for sizeof operator on SVE
Browse files Browse the repository at this point in the history
Previously the table in LanguageExtensions said that sizeof worked on
SVE types but this is only correct for fixed-length vectors so a
clarification has been added.
  • Loading branch information
DavidTruby committed Aug 11, 2022
1 parent a9e9dd9 commit bbb30bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/docs/LanguageExtensions.rst
Expand Up @@ -552,7 +552,7 @@ bitwise operators &,|,^,~ yes yes yes yes yes
==, !=, >, <, >=, <= yes yes yes yes yes
= yes yes yes yes yes
?: [#]_ yes -- yes yes yes
sizeof yes yes yes yes yes
sizeof yes yes yes yes yes [#]_
C-style cast yes yes yes no no
reinterpret_cast yes no yes no no
static_cast yes no yes no no
Expand All @@ -568,6 +568,7 @@ See also :ref:`langext-__builtin_shufflevector`, :ref:`langext-__builtin_convert
conversions (that is, != 0).
If it's an extension (OpenCL) vector, it's only available in C and OpenCL C.
And it selects base on signedness of the condition operands (OpenCL v1.1 s6.3.9).
.. [#] sizeof can only be used on vector length specific SVE types.
.. [#] Clang does not allow the address of an element to be taken while GCC
allows this. This is intentional for vectors with a boolean element type and
not implemented otherwise.
Expand Down

0 comments on commit bbb30bd

Please sign in to comment.