From bf7553889594886213e05cd3f94a6d6f7747bf7b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 25 Jan 2008 19:16:19 +0000 Subject: [PATCH] fix isIntegerConstantExpr evaluation of unary !. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46364 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/Expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AST/Expr.cpp b/AST/Expr.cpp index becce2a622..51aa09c6ba 100644 --- a/AST/Expr.cpp +++ b/AST/Expr.cpp @@ -703,7 +703,7 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx, } break; case UnaryOperator::LNot: { - bool Val = Result != 0; + bool Val = Result == 0; Result.zextOrTrunc( static_cast(Ctx.getTypeSize(getType(), Exp->getOperatorLoc()))); -- 2.50.1