loplugin:unusedmethods tweak for less noise
Change-Id: Idedd1680b03f6b62ff80ad7d0fd74c11d1675053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177533 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
f4fe6df6aa
commit
27509505be
1 changed files with 6 additions and 0 deletions
|
@ -285,6 +285,8 @@ gotfunc:
|
||||||
logCallToRootMethods(calleeFunctionDecl, usedReturnSet);
|
logCallToRootMethods(calleeFunctionDecl, usedReturnSet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (auto attributedStmt = dyn_cast<AttributedStmt>(parent))
|
||||||
|
parent = attributedStmt->getSubStmt();
|
||||||
if (isa<Expr>(parent) || isa<ReturnStmt>(parent) || isa<DeclStmt>(parent)
|
if (isa<Expr>(parent) || isa<ReturnStmt>(parent) || isa<DeclStmt>(parent)
|
||||||
|| isa<IfStmt>(parent) || isa<SwitchStmt>(parent) || isa<ForStmt>(parent)
|
|| isa<IfStmt>(parent) || isa<SwitchStmt>(parent) || isa<ForStmt>(parent)
|
||||||
|| isa<WhileStmt>(parent) || isa<DoStmt>(parent)
|
|| isa<WhileStmt>(parent) || isa<DoStmt>(parent)
|
||||||
|
@ -298,6 +300,10 @@ gotfunc:
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
report(
|
||||||
|
DiagnosticsEngine::Warning,
|
||||||
|
"unknown parent?",
|
||||||
|
parent->getBeginLoc());
|
||||||
parent->dump();
|
parent->dump();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue