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/SemaChecking.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/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 06035921d98..41ac77b43be 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -1276,7 +1276,7 @@ bool Sema::SemaBuiltinUnorderedCompare(CallExpr *TheCall) { // If the common type isn't a real floating type, then the arguments were // invalid for this operation. - if (!Res->isRealFloatingType()) + if (Res.isNull() || !Res->isRealFloatingType()) return Diag(OrigArg0.get()->getLocStart(), diag::err_typecheck_call_invalid_ordered_compare) << OrigArg0.get()->getType() << OrigArg1.get()->getType() |