fcl-passrc: useanalyzer: no hint for assembler result

git-svn-id: trunk@38081 -
This commit is contained in:
Mattias Gaertner 2018-01-29 21:01:22 +00:00
parent 1267814275
commit 064e7f391e

View File

@ -1814,7 +1814,7 @@ var
Usage: TPAElement; Usage: TPAElement;
ProcScope: TPasProcedureScope; ProcScope: TPasProcedureScope;
PosEl: TPasElement; PosEl: TPasElement;
DeclProc: TPasProcedure; DeclProc, ImplProc: TPasProcedure;
begin begin
{$IFDEF VerbosePasAnalyzer} {$IFDEF VerbosePasAnalyzer}
writeln('TPasAnalyzer.EmitProcedureHints ',GetElModName(El)); writeln('TPasAnalyzer.EmitProcedureHints ',GetElModName(El));
@ -1824,6 +1824,10 @@ begin
DeclProc:=El DeclProc:=El
else else
DeclProc:=ProcScope.DeclarationProc; DeclProc:=ProcScope.DeclarationProc;
if ProcScope.ImplProc=nil then
ImplProc:=El
else
ImplProc:=ProcScope.ImplProc;
if FindNode(DeclProc)=nil then if FindNode(DeclProc)=nil then
begin begin
// procedure never used // procedure never used
@ -1841,7 +1845,8 @@ begin
// procedure was used // procedure was used
if [pmAbstract,pmAssembler,pmExternal]*El.Modifiers<>[] then exit; if [pmAbstract,pmAssembler,pmExternal]*DeclProc.Modifiers<>[] then exit;
if [pmAssembler]*ImplProc.Modifiers<>[] then exit;
if ProcScope.DeclarationProc=nil then if ProcScope.DeclarationProc=nil then
begin begin