[clang] [clang][docs] Clarify the tail padding considered by `__datasizeof` (PR #125981)

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 5 18:23:41 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: A. Jiang (frederick-vs-ja)

<details>
<summary>Changes</summary>

Some tail padding are not reusable due to the ABI specification, and `__datasizeof` intentionally doesn't consider them.

Closes #<!-- -->125863.

---
Full diff: https://github.com/llvm/llvm-project/pull/125981.diff


1 Files Affected:

- (modified) clang/docs/LanguageExtensions.rst (+1-1) 


``````````diff
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index dd7513ceaa4e4b..a779064e84cb40 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -432,7 +432,7 @@ __datasizeof
 ------------
 
 ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the
-type ignoring tail padding.
+type ignoring reusable tail padding according to the ABI.
 
 _BitInt, _ExtInt
 ----------------

``````````

</details>


https://github.com/llvm/llvm-project/pull/125981


More information about the cfe-commits mailing list