diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-06-16 02:19:17 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-06-16 02:19:17 +0000 |
commit | 860a319e62b0e256817a458396d191aa91c0787a (patch) | |
tree | 02ff0cce9b63842370f14bbe22f67683ab5768ef /lib/Sema/SemaCast.cpp | |
parent | 3083d3c550dedf68101dd9133905c3c7d35662bd (diff) |
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.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158591 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCast.cpp')
-rw-r--r-- | lib/Sema/SemaCast.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Sema/SemaCast.cpp b/lib/Sema/SemaCast.cpp index dd5de02d15..b4bbe32125 100644 --- a/lib/Sema/SemaCast.cpp +++ b/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, |