CppSharp
CppSharp copied to clipboard
Handling of implicit ctor parameters in MS and Itanium ABI
So while looking through Clang MS ABI codegen code I noticed some ctors can have an extra implicit parameter which we do not handle.
See MicrosoftCXXABI::addImplicitConstructorArgs.
Additionally the parameter position changes depending if the method is variadic or not.
// Add the 'most_derived' argument second if we are variadic or last if not.
Similar thing for Itanium ABI as can be seen on Clang's Itanium codegen code.
// Insert the implicit 'vtt' argument as the second argument.
The best way to fix this is by reading the implicit parameters from Clang in Parser::WalkFunction (the part at the end about the code gen info). It might also be related to https://github.com/mono/CppSharp/issues/1450.
Its not related, this is just for some type of constructors.