about summary refs log tree commit diff homepage
path: root/lib/Expr/ExprEvaluator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Expr/ExprEvaluator.cpp')
-rw-r--r--lib/Expr/ExprEvaluator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Expr/ExprEvaluator.cpp b/lib/Expr/ExprEvaluator.cpp
index 41cb7c48..efb0d658 100644
--- a/lib/Expr/ExprEvaluator.cpp
+++ b/lib/Expr/ExprEvaluator.cpp
@@ -75,7 +75,7 @@ ExprVisitor::Action ExprEvaluator::protectedDivOperation(const BinaryExpr &e) {
                         visit(e.right) };
 
   if (ConstantExpr *CE = dyn_cast<ConstantExpr>(kids[1]))
-    if (!CE->getConstantValue())
+    if (CE->isZero())
       kids[1] = e.right;
 
   if (kids[0]!=e.left || kids[1]!=e.right) {