summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCast.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-10-07 02:45:12 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-10-07 02:45:12 +0000
commit74ce7112c3fccccfa7edb134c0a2d8fe2aab462f (patch)
treea1a3033a88578775d8ad04388ae2bcbc9c00c999 /clang/lib/Sema/SemaCast.cpp
parenta30730f6904916e8c97f6fd934bf493e999cb1e4 (diff)
downloadbcm5719-llvm-74ce7112c3fccccfa7edb134c0a2d8fe2aab462f.tar.gz
bcm5719-llvm-74ce7112c3fccccfa7edb134c0a2d8fe2aab462f.zip
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. llvm-svn: 373874
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCast.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp
index 71e5e8e4286..8c6abc448d9 100644
--- a/clang/lib/Sema/SemaCast.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud