loplugin:unusedenumconstants look through parentheses

Change-Id: I2afdf5a56d827e283dd2362b87446ad7848cb274
Reviewed-on: https://gerrit.libreoffice.org/64452
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-12-03 15:45:50 +02:00
parent 35d9c53570
commit e909028cab
5 changed files with 658 additions and 667 deletions

View File

@@ -179,7 +179,7 @@ walk_up:
// Ignore a common pattern that does not introduce any new information, merely removes
// information: foo &= ~Enum6::Top
bool found = false;
if (auto innerOperatorCall = dyn_cast<CXXOperatorCallExpr>(operatorCall->getArg(1)))
if (auto innerOperatorCall = dyn_cast<CXXOperatorCallExpr>(operatorCall->getArg(1)->IgnoreImplicit()->IgnoreParens()->IgnoreImplicit()))
{
found = innerOperatorCall->getOperator() == OO_Tilde;
}