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

Ted Kremenek kremenek at apple.com
Fri Oct 16 13:45:06 PDT 2009


Author: kremenek
Date: Fri Oct 16 15:45:04 2009
New Revision: 84268

URL: http://llvm.org/viewvc/llvm-project?rev=84268&view=rev
Log:
Provide 'static' version of BinaryOperator::isShiftOp().

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=84268&r1=84267&r2=84268&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Fri Oct 16 15:45:04 2009
@@ -1673,7 +1673,8 @@
   /// predicates to categorize the respective opcodes.
   bool isMultiplicativeOp() const { return Opc >= Mul && Opc <= Rem; }
   bool isAdditiveOp() const { return Opc == Add || Opc == Sub; }
-  bool isShiftOp() const { return Opc == Shl || Opc == Shr; }
+  static bool isShiftOp(Opcode Opc) { return Opc == Shl || Opc == Shr; }
+  bool isShiftOp() const { return isShiftOp(Opc); }
   bool isBitwiseOp() const { return Opc >= And && Opc <= Or; }
 
   static bool isRelationalOp(Opcode Opc) { return Opc >= LT && Opc <= GE; }





More information about the cfe-commits mailing list