From: Chris Lattner Date: Fri, 25 Jan 2008 19:16:19 +0000 (+0000) Subject: fix isIntegerConstantExpr evaluation of unary !. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf7553889594886213e05cd3f94a6d6f7747bf7b;p=clang fix isIntegerConstantExpr evaluation of unary !. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46364 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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())));