]> granicus.if.org Git - clang/commitdiff
use the right rounding mode.
authorChris Lattner <sabre@nondot.org>
Tue, 25 Sep 2007 04:29:44 +0000 (04:29 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 25 Sep 2007 04:29:44 +0000 (04:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42291 91177308-0d34-0410-b5e6-96231b3b80d8

AST/Expr.cpp

index 98963de63378b2576ec101ee2f93ea81e48bee79..ce6636a52a59e5f88a4db83ad953ea61d7194cd6 100644 (file)
@@ -753,7 +753,7 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx,
     
     llvm::APFloat::opStatus Status =
       FL->getValue().convertToInteger(Space, DestWidth, DestSigned,
-                                      llvm::APFloat::rmNearestTiesToEven);
+                                      llvm::APFloat::rmTowardZero);
     if (Status != llvm::APFloat::opOK && Status != llvm::APFloat::opInexact) {
       if (Loc) *Loc = Operand->getLocStart();
       return false; // FIXME: need to accept this as an extension.