Obsolete Calling Convention

Warns about 'Declare' statements that are using the obsolete/unsupported 'CDecl' calling convention on Windows.

Reasoning

The CDecl calling convention is only implemented in VBA for Mac; if Rubberduck can see it (Rubberduck only runs on Windows), then the declaration is using an unsupported (no-op) calling convention on Windows.

Default severity

Warning

Inspection type

CodeQualityIssues

Examples

This example should trigger a result

MyModule (StandardModule)
Private Declare Sub Beep CDecl Lib "kernel32" (dwFreq As Any, dwDuration As Any)

This example should NOT trigger a result

MyModule (StandardModule)
Private Declare Sub Beep Lib "kernel32" (dwFreq As Any, dwDuration As Any)

Rubberduck.CodeAnalysis.Inspections.Concrete.ObsoleteCallingConventionInspection.cs (Prerelease-v2.5.9.6289)