From 48f9640602ac75cb58cf53d56ce59e5b9ad0e18f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 17 Feb 2017 10:03:12 +0200 Subject: [PATCH] isAssignmentOp is not available on older clang Change-Id: I1ee7a8266a2ad0e14a28fab7aa0095b15647d5b0 --- compilerplugins/clang/unusedenumconstants.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;