aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2018-09-21 14:31:25 +0000
committerJF Bastien <jfbastien@apple.com>2018-09-21 14:31:25 +0000
commit19262fc5966ab569f21f3d440f8b001bca666f17 (patch)
treebe359d81e70325e9e600c2394f24e9ab38181eba /clang/lib/CodeGen/CodeGenModule.cpp
parent2adecff1aad61968c78b4ebeb0a5c2d016ea255f (diff)
downloadllvm-19262fc5966ab569f21f3d440f8b001bca666f17.zip
llvm-19262fc5966ab569f21f3d440f8b001bca666f17.tar.gz
llvm-19262fc5966ab569f21f3d440f8b001bca666f17.tar.bz2
[ADT] restrict bit_cast to trivially-constructible To
Summary: As discussed in r341853 by blaikie, the reinterpret_cast was technically an aliasing violation. Restrict our bit_cast implementation to To which are trivially-constructible (and note the existing restriction to constexpr). Once we move to C++17 we can use a version of bit_cast without these restrictions, or if we care we can SFINAE a different implementation when To isn't trivially-constructible. Originally landed in r342710 and reverted in r342711 because is_trivially_copyable is only in GCC 5.1 and later. Reviewers: dblaikie, rsmith Subscribers: dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D52332 llvm-svn: 342739
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions