]> granicus.if.org Git - clang/commit
Fix a horrible bug in our handling of C-style casting, where a C-style
authorDouglas Gregor <dgregor@apple.com>
Thu, 27 Jan 2011 00:58:17 +0000 (00:58 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 27 Jan 2011 00:58:17 +0000 (00:58 +0000)
commit14d0aee957f11b9613fa4312919bec3cc5456a1c
treeb54c89ea196f1db30a542516edcf1f51543ab982
parent52a80e19ad688091723a52ad53337767bb0ac684
Fix a horrible bug in our handling of C-style casting, where a C-style
derived-to-base cast that also casts away constness (one of the cases
for static_cast followed by const_cast) would be treated as a bit-cast
rather than a derived-to-base class, causing miscompiles and
heartburn.

Fixes <rdar://problem/8913298>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124340 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaCXXCast.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplate.cpp
test/CXX/expr/expr.cast/p4.cpp [new file with mode: 0644]