You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This clause unwraps AttributedType and calls the same function for attributedType.ModifiedType.
attributedType.Handle.FunctionTypeCallingConv is CXCallingConv_X86StdCall, but ModifiedType does not have this information and attributedType.ModifiedType.Handle.FunctionTypeCallingConv is CXCallingConv_C
win32metadata evades this by having Winapi as a default calling convention (--with-callconv *=Winapi) and seemingly all callbacks using this calling convention.
The text was updated successfully, but these errors were encountered:
Repro:
test.cpp
:Command line (on arch linux):
dotnet run -r ubuntu.18.04-x64 -f net5.0 -- -a -target i386-pc-win32 -n test -f test.cpp -o test.cs
Produced output:
Expected output:
(Notice the ignored calling convention)
I found a codepath where this information was discarded:
https://github.com/microsoft/ClangSharp/blob/73da2e7a8f75a2b789620b0882a55dd66b6ee05c/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs#L1625-L1628
This clause unwraps
AttributedType
and calls the same function forattributedType.ModifiedType
.attributedType.Handle.FunctionTypeCallingConv
isCXCallingConv_X86StdCall
, but ModifiedType does not have this information andattributedType.ModifiedType.Handle.FunctionTypeCallingConv
isCXCallingConv_C
win32metadata evades this by having Winapi as a default calling convention (
--with-callconv *=Winapi
) and seemingly all callbacks using this calling convention.The text was updated successfully, but these errors were encountered: