[PATCH] D14977: clang-tidy: code cleanup with isAssignmentOperator
Daniel Marjamäki via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 25 02:21:41 PST 2015
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)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14977.41117.patch
Type: text/x-patch
Size: 733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151125/27a718a1/attachment.bin>
More information about the cfe-commits
mailing list