3 Commits

Author SHA1 Message Date
Timm Bäder
0211389064 [clang][Interp] Handle __datasizeof. 2024-03-17 16:33:39 +01:00
Ilya Biryukov
9acd61ec19
[Sema] Fix crash in __datasizeof with unknown types (#80300)
Fixes #80284.

Calling `getASTRecordLayout` on invalid types may crash and results of
`__datasizeof` on invalid types can be arbitrary, so just use whatever
`sizeof` returns.
2024-02-01 17:09:32 +01:00
philnik777
4cc791bc98
[Clang] Add __datasizeof (#67805)
The data size is required for implementing the `memmove` optimization
for `std::copy`, `std::move` etc. correctly as well as replacing
`__compressed_pair` with `[[no_unique_address]]` in libc++. Since the
compiler already knows the data size, we can avoid some complexity by
exposing that information.
2023-11-13 11:00:07 +01:00