]> granicus.if.org Git - clang/commitdiff
Added predicate function "UnaryOperator::isIncrementOp()".
authorTed Kremenek <kremenek@apple.com>
Fri, 15 Feb 2008 22:04:52 +0000 (22:04 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 15 Feb 2008 22:04:52 +0000 (22:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47181 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index 47f2269f48bee6af99ce9773abe5e2dc6152c67c..453f754f8fbfec760192375b9b41ae7615a23feb 100644 (file)
@@ -435,6 +435,7 @@ public:
   static bool isPostfix(Opcode Op);
 
   bool isPostfix() const { return isPostfix(Opc); }
+  bool isIncrementOp() const {return Opc==PreInc || Opc==PostInc; }
   bool isIncrementDecrementOp() const { return Opc>=PostInc && Opc<=PreDec; }
   bool isSizeOfAlignOfOp() const { return Opc == SizeOf || Opc == AlignOf; }
   bool isOffsetOfOp() const { return Opc == OffsetOf; }