diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2022-02-07 15:40:28 +0000 |
|---|---|---|
| committer | Guillaume Chatelet <gchatelet@google.com> | 2022-02-08 20:45:59 +0000 |
| commit | 7e7ecef98080500ad12766695a86d687170d3639 (patch) | |
| tree | b27356cd3b41b8c14e066ba45ddfc9f340f595ce /libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp | |
| parent | 9be6e40d1afb59bd33acab5bf8de830cff92c860 (diff) | |
[libc] Replace type punning with bit_cast
Although type punning is defined for union in C, it is UB in C++.
This patch introduces a bit_cast function to convert between types in a safe way.
This is necessary to get llvm-libc compile with GCC.
This patch is extracted from D119002.
Differential Revision: https://reviews.llvm.org/D119145
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp')
0 files changed, 0 insertions, 0 deletions
