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 | 93ee5ca805f9d51c13dc613a07048ea83728fd97 (patch) | |
tree | 3c8a7ceb6a3b9eb657fac604025c92293386f499 /clang/lib/Sema/SemaCast.cpp | |
parent | 818e9f4a26a6c7aa0bdecb28b66ff30f44f9e4a6 (diff) | |
download | bcm5719-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.cpp | 6 |
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, |