CppSharp icon indicating copy to clipboard operation
CppSharp copied to clipboard

Handling of implicit ctor parameters in MS and Itanium ABI

Open tritao opened this issue 8 years ago • 2 comments

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.

tritao avatar Dec 30 '16 15:12 tritao

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.

ddobrev avatar Oct 25 '20 20:10 ddobrev

Its not related, this is just for some type of constructors.

tritao avatar Oct 25 '20 20:10 tritao