sonar-delphi icon indicating copy to clipboard operation
sonar-delphi copied to clipboard

Error raised when analyzing varargs method call

Open FlavienQui opened this issue 1 year ago • 1 comments

Prerequisites

  • [X] This bug is in SonarDelphi, not SonarQube or my Delphi code.
  • [X] This bug has not already been reported.

SonarDelphi version

1.6.0

SonarQube version

No response

Issue description

Running analysis with DelphiLint 1.1.1 in Standalone mode, an error is raised when the code contains a method call with the varargs directive. Capture

Steps to reproduce

Analyze the file with the minimal Delphi code joined to this issue.

Minimal Delphi code exhibiting the issue

unit Unit1;

interface

procedure MyProcedure;

var
  SetValues: procedure(AValues: Integer); cdecl varargs;

implementation

procedure MyProcedure;
var
  LValue: Integer;
begin
  LValue := 1;
  SetValues(LValue, LValue);
end;

end.

FlavienQui avatar Oct 01 '24 07:10 FlavienQui