danielmarjamaki created this revision. danielmarjamaki added subscribers: cfe-commits, alexfh.
This is a small code cleanup. No change in logical behaviour is intended. http://reviews.llvm.org/D14977 Files: clang-tidy/misc/AssertSideEffectCheck.cpp Index: clang-tidy/misc/AssertSideEffectCheck.cpp =================================================================== --- clang-tidy/misc/AssertSideEffectCheck.cpp +++ clang-tidy/misc/AssertSideEffectCheck.cpp @@ -33,11 +33,7 @@ } 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)) {
Index: clang-tidy/misc/AssertSideEffectCheck.cpp =================================================================== --- clang-tidy/misc/AssertSideEffectCheck.cpp +++ clang-tidy/misc/AssertSideEffectCheck.cpp @@ -33,11 +33,7 @@ } 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)) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits