|
@@ -854,6 +854,7 @@ var
|
|
CaseSt: TPasImplCaseStatement;
|
|
CaseSt: TPasImplCaseStatement;
|
|
WithDo: TPasImplWithDo;
|
|
WithDo: TPasImplWithDo;
|
|
SubEl, ParentEl: TPasElement;
|
|
SubEl, ParentEl: TPasElement;
|
|
|
|
+ ForScope: TPasForLoopScope;
|
|
begin
|
|
begin
|
|
// do not mark
|
|
// do not mark
|
|
if El=nil then exit;
|
|
if El=nil then exit;
|
|
@@ -903,6 +904,10 @@ begin
|
|
UseExpr(ForLoop.VariableName);
|
|
UseExpr(ForLoop.VariableName);
|
|
UseExpr(ForLoop.StartExpr);
|
|
UseExpr(ForLoop.StartExpr);
|
|
UseExpr(ForLoop.EndExpr);
|
|
UseExpr(ForLoop.EndExpr);
|
|
|
|
+ ForScope:=ForLoop.CustomData as TPasForLoopScope;
|
|
|
|
+ UseProcedure(ForScope.GetEnumerator);
|
|
|
|
+ UseProcedure(ForScope.MoveNext);
|
|
|
|
+ UseVariable(ForScope.Current,rraRead,false);
|
|
UseImplElement(ForLoop.Body);
|
|
UseImplElement(ForLoop.Body);
|
|
end
|
|
end
|
|
else if C=TPasImplIfElse then
|
|
else if C=TPasImplIfElse then
|
|
@@ -1190,6 +1195,7 @@ var
|
|
ProcScope: TPasProcedureScope;
|
|
ProcScope: TPasProcedureScope;
|
|
ImplProc: TPasProcedure;
|
|
ImplProc: TPasProcedure;
|
|
begin
|
|
begin
|
|
|
|
+ if Proc=nil then exit;
|
|
// use declaration, not implementation
|
|
// use declaration, not implementation
|
|
ProcScope:=Proc.CustomData as TPasProcedureScope;
|
|
ProcScope:=Proc.CustomData as TPasProcedureScope;
|
|
if ProcScope.DeclarationProc<>nil then
|
|
if ProcScope.DeclarationProc<>nil then
|
|
@@ -1442,6 +1448,7 @@ var
|
|
i: Integer;
|
|
i: Integer;
|
|
IsRead, IsWrite, CanRead, CanWrite: Boolean;
|
|
IsRead, IsWrite, CanRead, CanWrite: Boolean;
|
|
begin
|
|
begin
|
|
|
|
+ if El=nil then exit;
|
|
{$IFDEF VerbosePasAnalyzer}
|
|
{$IFDEF VerbosePasAnalyzer}
|
|
writeln('TPasAnalyzer.UseVariable ',GetElModName(El),' ',Access,' Full=',UseFull);
|
|
writeln('TPasAnalyzer.UseVariable ',GetElModName(El),' ',Access,' Full=',UseFull);
|
|
{$ENDIF}
|
|
{$ENDIF}
|