[Libreoffice-commits] core.git: compilerplugins/clang
Noel Grandin
noel.grandin at collabora.co.uk
Fri Feb 17 08:05:02 UTC 2017
compilerplugins/clang/unusedenumconstants.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 48f9640602ac75cb58cf53d56ce59e5b9ad0e18f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Feb 17 10:03:12 2017 +0200
isAssignmentOp is not available on older clang
Change-Id: I1ee7a8266a2ad0e14a28fab7aa0095b15647d5b0
diff --git a/compilerplugins/clang/unusedenumconstants.cxx b/compilerplugins/clang/unusedenumconstants.cxx
index 8ba5d23..51f445b 100644
--- a/compilerplugins/clang/unusedenumconstants.cxx
+++ b/compilerplugins/clang/unusedenumconstants.cxx
@@ -166,7 +166,9 @@ try_again:
}
} else if (const CXXOperatorCallExpr * operatorCall = dyn_cast<CXXOperatorCallExpr>(parent))
{
- if (operatorCall->isAssignmentOp()) {
+ auto oo = operatorCall->getOperator();
+ if (oo == OO_Equal
+ || (oo >= OO_PlusEqual && oo <= OO_GreaterGreaterEqual)) {
bWrite = true;
} else {
bRead = true;
More information about the Libreoffice-commits
mailing list