diff --git a/compilerplugins/clang/unusedenumconstants.cxx b/compilerplugins/clang/unusedenumconstants.cxx index 8ba5d23f8485..51f445b7a940 100644 --- a/compilerplugins/clang/unusedenumconstants.cxx +++ b/compilerplugins/clang/unusedenumconstants.cxx @@ -166,7 +166,9 @@ try_again: } } else if (const CXXOperatorCallExpr * operatorCall = dyn_cast(parent)) { - if (operatorCall->isAssignmentOp()) { + auto oo = operatorCall->getOperator(); + if (oo == OO_Equal + || (oo >= OO_PlusEqual && oo <= OO_GreaterGreaterEqual)) { bWrite = true; } else { bRead = true;