forked from OSchip/llvm-project
[clang-tidy] code cleanup using isAssignmentOp()
llvm-svn: 254066
This commit is contained in:
parent
70e2508259
commit
8ade8d2efd
|
@ -33,11 +33,7 @@ AST_MATCHER_P(Expr, hasSideEffect, bool, CheckFunctionCalls) {
|
|||
}
|
||||
|
||||
if (const auto *Op = dyn_cast<BinaryOperator>(E)) {
|
||||
BinaryOperator::Opcode OC = Op->getOpcode();
|
||||
return OC == BO_Assign || OC == BO_MulAssign || OC == BO_DivAssign ||
|
||||
OC == BO_RemAssign || OC == BO_AddAssign || OC == BO_SubAssign ||
|
||||
OC == BO_ShlAssign || OC == BO_ShrAssign || OC == BO_AndAssign ||
|
||||
OC == BO_XorAssign || OC == BO_OrAssign;
|
||||
return Op->isAssignmentOp();
|
||||
}
|
||||
|
||||
if (const auto *OpCallExpr = dyn_cast<CXXOperatorCallExpr>(E)) {
|
||||
|
|
Loading…
Reference in New Issue