[cfe-commits] r112048 - /cfe/trunk/include/clang/AST/Expr.h

Benjamin Kramer benny.kra at googlemail.com
Wed Aug 25 06:24:04 PDT 2010


Author: d0k
Date: Wed Aug 25 08:24:04 2010
New Revision: 112048

URL: http://llvm.org/viewvc/llvm-project?rev=112048&view=rev
Log:
Silence a GCC warning saying that unsigned >= UO_PostInc is always true.

Modified:
    cfe/trunk/include/clang/AST/Expr.h

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=112048&r1=112047&r2=112048&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Wed Aug 25 08:24:04 2010
@@ -1080,10 +1080,10 @@
   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;





More information about the cfe-commits mailing list