diff options
author | Anders Carlsson <andersca@mac.com> | 2008-12-01 02:07:06 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-12-01 02:07:06 +0000 |
commit | 027f62ec1860f4ab0c91bd863b238938880b8102 (patch) | |
tree | 21e3e926d611042840874d2bb1bd16f8b12f623f /lib/AST/ExprConstant.cpp | |
parent | e21555e666004b9aea0c8122358bc4cd3e61c4e7 (diff) |
Emit the correct diagnostic when a comma is in an ICE.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 855385cf98..b9f3c77363 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -516,13 +516,13 @@ bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { // Evaluate the side that actually matters; this needs to be // handled specially because calling Visit() on the LHS can // have strange results when it doesn't have an integral type. - if (Visit(E->getRHS())) - return true; - + if (!Visit(E->getRHS())) + return false; + if (Info.ShortCircuit) return Extension(E->getOperatorLoc(), diag::note_comma_in_ice, E); - return false; + return true; } if (E->isLogicalOp()) { |