+ remove try ... finally statements if the finally block is empty

git-svn-id: trunk@48174 -
This commit is contained in:
florian 2021-01-18 21:29:52 +00:00
parent 92c3aedac4
commit 16f201292c

View File

@ -2722,6 +2722,13 @@ implementation
result:=right;
right:=nil;
end;
{ if the finally block contains no code, we can kill
it and just return the try part }
if has_no_code(right) and not(assigned(third)) and not(implicitframe) then
begin
result:=left;
left:=nil;
end;
end;