]> granicus.if.org Git - clang/commitdiff
Silence a GCC warning saying that unsigned >= UO_PostInc is always true.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 25 Aug 2010 13:24:04 +0000 (13:24 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 25 Aug 2010 13:24:04 +0000 (13:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112048 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index e96a33f503e377ab76d052891ca5a5feb3b2504a..61159fdc4a65ebaea5ef6a649381563e11f9dbb5 100644 (file)
@@ -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;