summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCast.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-06-16 02:19:17 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-06-16 02:19:17 +0000
commit93ee5ca805f9d51c13dc613a07048ea83728fd97 (patch)
tree3c8a7ceb6a3b9eb657fac604025c92293386f499 /clang/lib/Sema/SemaCast.cpp
parent818e9f4a26a6c7aa0bdecb28b66ff30f44f9e4a6 (diff)
downloadbcm5719-llvm-93ee5ca805f9d51c13dc613a07048ea83728fd97.tar.gz
bcm5719-llvm-93ee5ca805f9d51c13dc613a07048ea83728fd97.zip
Fix Sema and IRGen for atomic compound assignment so it has the right semantics when promotions are involved.
(As far as I can tell, this only affects some edge cases.) llvm-svn: 158591
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCast.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp
index dd5de02d15d..b4bbe321253 100644
--- a/clang/lib/Sema/SemaCast.cpp
+++ b/clang/lib/Sema/SemaCast.cpp
@@ -1303,7 +1303,7 @@ TryStaticImplicitCast(Sema &Self, ExprResult &SrcExpr, QualType DestType,
if (DestType->isRecordType()) {
if (Self.RequireCompleteType(OpRange.getBegin(), DestType,
diag::err_bad_dynamic_cast_incomplete) ||
- Self.RequireNonAbstractType(OpRange.getBegin(), DestType,
+ Self.RequireNonAbstractType(OpRange.getBegin(), DestType,
diag::err_allocation_of_abstract_type)) {
msg = 0;
return TC_Failed;
@@ -1916,10 +1916,6 @@ void CastOperation::CheckCStyleCast() {
return;
QualType SrcType = SrcExpr.get()->getType();
- // You can cast an _Atomic(T) to anything you can cast a T to.
- if (const AtomicType *AtomicSrcType = SrcType->getAs<AtomicType>())
- SrcType = AtomicSrcType->getValueType();
-
assert(!SrcType->isPlaceholderType());
if (Self.RequireCompleteType(OpRange.getBegin(), DestType,
OpenPOWER on IntegriCloud