[llvm-branch-commits] [clang] aa20ed6 - [clang][AArch64][SVE] Clarify documentation for sizeof operator on SVE
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 15 00:32:32 PDT 2022
Author: David Truby
Date: 2022-08-15T09:30:54+02:00
New Revision: aa20ed6187b7300ef627ff4c28d8150c41cafb54
URL: https://github.com/llvm/llvm-project/commit/aa20ed6187b7300ef627ff4c28d8150c41cafb54
DIFF: https://github.com/llvm/llvm-project/commit/aa20ed6187b7300ef627ff4c28d8150c41cafb54.diff
LOG: [clang][AArch64][SVE] Clarify documentation for sizeof operator on SVE
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.
(cherry picked from commit bbb30bd54a6447702f9f59a2ae4c478eb7133ae0)
Added:
Modified:
clang/docs/LanguageExtensions.rst
Removed:
################################################################################
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 86e88b19d7df..6b8b88020ed0 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -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
@@ -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.
More information about the llvm-branch-commits
mailing list