loplugin:unusedfields update for new clang AST nodes

Change-Id: Icc47093ab13123e9cb2866434796c7d6e8eb38d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166291
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-04-18 14:50:17 +02:00
parent 0c7ae3bd96
commit 5c6cdc5d5a

View file

@ -724,6 +724,16 @@ void UnusedFields::checkIfReadFrom(const FieldDecl* fieldDecl, const Expr* membe
{
break;
}
else if (isa<DeclRefExpr>(parent)) // things like o3tl::convertNarrowing pass members as template params
{
bPotentiallyReadFrom = true;
break;
}
else if (isa<DesignatedInitExpr>(parent))
{
bPotentiallyReadFrom = true;
break;
}
else
{
bPotentiallyReadFrom = true;
@ -949,6 +959,15 @@ void UnusedFields::checkIfWrittenTo(const FieldDecl* fieldDecl, const Expr* memb
{
break;
}
else if (isa<DeclRefExpr>(parent)) // things like o3tl::convertNarrowing pass members as template params
{
break;
}
else if (isa<DesignatedInitExpr>(parent))
{
bPotentiallyWrittenTo = true;
break;
}
else
{
bPotentiallyWrittenTo = true;