diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:09:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:09:03 +0000 |
commit | c3b054d250cdca485c71845089c316e10610ebad (patch) | |
tree | abae0246ec9156cc1a7cbb947b2b0dfe95fa3189 /lib/AST/ExprConstant.cpp | |
parent | bca07a4524feb4edec581062d631a13116320a24 (diff) | |
download | src-c3b054d250cdca485c71845089c316e10610ebad.tar.gz src-c3b054d250cdca485c71845089c316e10610ebad.zip |
Notes
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 656bb99df98e..3a5eb66ea18f 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -2926,7 +2926,7 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) { Exp->getOpcode() == BO_Rem) { // Evaluate gives an error for undefined Div/Rem, so make sure // we don't evaluate one. - if (LHSResult.Val != 2 && RHSResult.Val != 2) { + if (LHSResult.Val == 0 && RHSResult.Val == 0) { llvm::APSInt REval = Exp->getRHS()->EvaluateAsInt(Ctx); if (REval == 0) return ICEDiag(1, E->getLocStart()); |