<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/125863>125863</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
__datasizeof() does not ignore tail padding.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
IViktorov
</td>
</tr>
</table>
<pre>
```C++
#include <cstdint>
struct Tst {
std::uint32_t u1;
std::uint8_t u2;
};
static_assert(sizeof(Tst) == 8);
static_assert(__datasizeof(Tst) == 5);
```
`__datasizeof(Tst)` returns 8 instead of 5.
If I'm missing something and it should work that way, than it would be good to clarify that here: https://clang.llvm.org/docs/LanguageExtensions.html#implementation-defined-keywords
https://godbolt.org/z/ejPYcs8oq
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0ksFq-zgQxp9mfBkSbMl27IMP-TcNFPawh7KwpyBbY1utLGWlcbPp0y9KQpeWXRBo4KdvRvPNqBjN5Ig6qH5BdcjUyrMP3csf5p198B9Z7_W1gzq_nycQv9LJ9yCkcYNdNSHIpyGyNo5BPieU7yOHdWB8jYywS88xsga5B7lfjWMpToxrAfKGEL_TJkFxh7A7PIJHXsVmOKkYKTCIJppP8iOI5jUyiBZBHkAesAHR3mU_BaeTVqz-R1Z9yb4aflSu8_8UQp1jIF6Di9igcZFJafQjVlvI9y8jvoDYLbiYGI2bMPqFeE6RchoNY5z9ajVefHhHnhXjRV1BPKXYJX654Z5w8l4jexysCma83h_PFAjkHmfmc0z2iSOI42CVm7bWfixbHyYQR-2HCOL4m3LTqiZ6_pvJReNd3M682DTH5WxpIZes8m6jaTSO9OadrhcfdLxb8L3I5HXvLT8qfII40tvvfw6x8X9lupO6la3KqCt2stnVVVMW2dw1sqqrcqyrtihkXdPYj3md5ySqsh5EqTLTiVxUuciropS53G37qtFlNdTtOLRtXxdQ5rQoY7-6y0yMK3WFqJpaZlb1ZONtk4VwdMEbBSHSYocuiTb9OkUoc2six3_TsGFL3Y8Rp8XQniI6z2gm5wMhK2PxrLQ2btpma7DdD18Mz2u_HfwC4pjSP67NOfg3GhjE8fapNJDHrz868U8AAAD__05WGdU">