]> granicus.if.org Git - clang/commitdiff
Provide 'static' version of BinaryOperator::isShiftOp().
authorTed Kremenek <kremenek@apple.com>
Fri, 16 Oct 2009 20:45:04 +0000 (20:45 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 16 Oct 2009 20:45:04 +0000 (20:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84268 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index fb87ed631acb9c1ed40b2de9873a3a68d6af897d..a560ac404805ca663388993f88054efe5df8c976 100644 (file)
@@ -1673,7 +1673,8 @@ public:
   /// 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; }