summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-16 20:45:04 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-16 20:45:04 +0000
commit31fcde13ac7d7e44a9287632e9c8826cefa76a96 (patch)
treed61cfac26ce14ec48bcf376a915910eccdcac59d
parent16bef857d91ad9328874b85f59edd04155aa9579 (diff)
downloadbcm5719-llvm-31fcde13ac7d7e44a9287632e9c8826cefa76a96.tar.gz
bcm5719-llvm-31fcde13ac7d7e44a9287632e9c8826cefa76a96.zip
Provide 'static' version of BinaryOperator::isShiftOp().
llvm-svn: 84268
-rw-r--r--clang/include/clang/AST/Expr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index fb87ed631ac..a560ac40480 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/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; }
OpenPOWER on IntegriCloud