Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[clang][docs] Clarify the tail padding considered by __datasizeof #125981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
Loading
from

Conversation

frederick-vs-ja
Copy link
Contributor

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

Closes #125863.

@frederick-vs-ja frederick-vs-ja added documentation clang Clang issues not falling into any other category labels Feb 6, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 6, 2025

@llvm/pr-subscribers-clang

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

Changes

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 --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
 ----------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__datasizeof() does not ignore tail padding.
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.