mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:39:28 +02:00
codetools: find unused units: add support for class helpers. (e.g. in "Unused units" dialog.)
git-svn-id: trunk@52411 -
This commit is contained in:
parent
ba927319a4
commit
eda5b1fdca
@ -1782,6 +1782,21 @@ var
|
||||
end;
|
||||
end;
|
||||
|
||||
function FindProceduresInHelper(Node: TCodeTreeNode): boolean;
|
||||
begin
|
||||
Result := False;
|
||||
Node := Node.FirstChild;
|
||||
while (Node<>nil) and (Node.Desc <> ctnEndPoint) do
|
||||
begin
|
||||
if (Node.Desc = ctnProcedure) and (Node.FirstChild<>nil) then
|
||||
begin
|
||||
if IsIdentifierUsed(Node.FirstChild.StartPos) then
|
||||
Exit(True);
|
||||
end;
|
||||
Node:=Node.Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
Node: TCodeTreeNode;
|
||||
begin
|
||||
@ -1789,6 +1804,8 @@ var
|
||||
Node:=IntfNode.FirstChild;
|
||||
while Node<>nil do begin
|
||||
case Node.Desc of
|
||||
ctnTypeHelper, ctnRecordHelper, ctnClassHelper:
|
||||
if FindProceduresInHelper(Node) then exit;
|
||||
ctnEnumIdentifier:
|
||||
if IsIdentifierUsed(Node.StartPos) then exit;
|
||||
ctnVarDefinition,ctnConstDefinition,ctnTypeDefinition,ctnGenericName:
|
||||
|
Loading…
Reference in New Issue
Block a user