From 12367e30e04e0f90e1c3b917fb7e596b74ad9a3e Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 25 Aug 2010 13:24:04 +0000 Subject: [PATCH] Silence a GCC warning saying that unsigned >= UO_PostInc is always true. llvm-svn: 112048 --- clang/include/clang/AST/Expr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index e96a33f503e3..61159fdc4a65 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -1080,10 +1080,10 @@ public: bool isPrefix() const { return isPrefix(getOpcode()); } bool isPostfix() const { return isPostfix(getOpcode()); } bool isIncrementOp() const { - return Opc == UO_PreInc || getOpcode() == UO_PostInc; + return Opc == UO_PreInc || Opc == UO_PostInc; } bool isIncrementDecrementOp() const { - return Opc >= UO_PostInc && Opc <= UO_PreDec; + return Opc <= UO_PreDec; } static bool isArithmeticOp(Opcode Op) { return Op >= UO_Plus && Op <= UO_LNot;