diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-07 02:45:12 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-07 02:45:12 +0000 |
commit | 231ea9998762f44267950a4c864442226b839c25 (patch) | |
tree | 056022c3b1523916246628733e3f13634894ad6d /lib/Sema | |
parent | 1c3c183da3437d9580a66c719a1cb54522d530ee (diff) | |
download | clang-231ea9998762f44267950a4c864442226b839c25.tar.gz |
Fix behavior of __builtin_bit_cast when the From and To types are the
same.
We were missing the lvalue-to-rvalue conversion entirely in this case,
and in fact still need the full CK_LValueToRValueBitCast conversion to
perform a load with no TBAA.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaCast.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/Sema/SemaCast.cpp b/lib/Sema/SemaCast.cpp index 71e5e8e428..8c6abc448d 100644 --- a/lib/Sema/SemaCast.cpp +++ b/lib/Sema/SemaCast.cpp @@ -2835,11 +2835,6 @@ void CastOperation::CheckBuiltinBitCast() { return; } - if (Self.Context.hasSameUnqualifiedType(DestType, SrcType)) { - Kind = CK_NoOp; - return; - } - Kind = CK_LValueToRValueBitCast; } |