From 40a5ef90ac8d3f29bc8fe4ff80e00eaf3ef5b79f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 16 Oct 2009 20:45:04 +0000 Subject: [PATCH] Provide 'static' version of BinaryOperator::isShiftOp(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84268 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Expr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index fb87ed631a..a560ac4048 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -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; } -- 2.40.0