[clang] bbb30bd - [clang][AArch64][SVE] Clarify documentation for sizeof operator on SVE

David Truby via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 06:22:34 PDT 2022


Author: David Truby
Date: 2022-08-11T13:22:23Z
New Revision: bbb30bd54a6447702f9f59a2ae4c478eb7133ae0

URL: https://github.com/llvm/llvm-project/commit/bbb30bd54a6447702f9f59a2ae4c478eb7133ae0
DIFF: https://github.com/llvm/llvm-project/commit/bbb30bd54a6447702f9f59a2ae4c478eb7133ae0.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.

Added: 
    

Modified: 
    clang/docs/LanguageExtensions.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 3b80289fd5fe..3adf0a12fc4c 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 cfe-commits mailing list