|
@@ -1713,20 +1713,28 @@ var
|
|
Usage: TPAElement;
|
|
Usage: TPAElement;
|
|
ProcScope: TPasProcedureScope;
|
|
ProcScope: TPasProcedureScope;
|
|
PosEl: TPasElement;
|
|
PosEl: TPasElement;
|
|
|
|
+ DeclProc: TPasProcedure;
|
|
begin
|
|
begin
|
|
{$IFDEF VerbosePasAnalyzer}
|
|
{$IFDEF VerbosePasAnalyzer}
|
|
writeln('TPasAnalyzer.EmitProcedureHints ',GetElModName(El));
|
|
writeln('TPasAnalyzer.EmitProcedureHints ',GetElModName(El));
|
|
{$ENDIF}
|
|
{$ENDIF}
|
|
ProcScope:=El.CustomData as TPasProcedureScope;
|
|
ProcScope:=El.CustomData as TPasProcedureScope;
|
|
- if (ProcScope.DeclarationProc=nil) and (FindNode(El)=nil) then
|
|
|
|
|
|
+ if ProcScope.DeclarationProc=nil then
|
|
|
|
+ DeclProc:=El
|
|
|
|
+ else
|
|
|
|
+ DeclProc:=ProcScope.DeclarationProc;
|
|
|
|
+ if FindNode(DeclProc)=nil then
|
|
begin
|
|
begin
|
|
// procedure never used
|
|
// procedure never used
|
|
- if El.Visibility in [visPrivate,visStrictPrivate] then
|
|
|
|
- EmitMessage(20170312093348,mtHint,nPAPrivateMethodIsNeverUsed,
|
|
|
|
- sPAPrivateMethodIsNeverUsed,[El.FullName],El)
|
|
|
|
- else
|
|
|
|
- EmitMessage(20170312093418,mtHint,nPALocalXYNotUsed,
|
|
|
|
- sPALocalXYNotUsed,[El.ElementTypeName,El.Name],El);
|
|
|
|
|
|
+ if ProcScope.DeclarationProc=nil then
|
|
|
|
+ begin
|
|
|
|
+ if El.Visibility in [visPrivate,visStrictPrivate] then
|
|
|
|
+ EmitMessage(20170312093348,mtHint,nPAPrivateMethodIsNeverUsed,
|
|
|
|
+ sPAPrivateMethodIsNeverUsed,[El.FullName],El)
|
|
|
|
+ else
|
|
|
|
+ EmitMessage(20170312093418,mtHint,nPALocalXYNotUsed,
|
|
|
|
+ sPALocalXYNotUsed,[El.ElementTypeName,El.Name],El);
|
|
|
|
+ end;
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
|
|
|