diff options
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()) { |