Joao Matos
7fedac2740
Fixed warnings in native test code.
7 years ago
Dimitar Dobrev
b0db304523
Fixed overloading of operators with parameters mapped to the same type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
a65f91949c
Handled int and long in maps to help resolve ambiguity.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
4adc3d646a
Fixed right-value references creating ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
202ae75df4
Fixed the generated code in a case of ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
a240827d54
Added a test for passing an std::string by value.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
41b22762a4
Fixed the marshalling of std::string with GCC 6+ on Linux.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
e035b27686
Fixed a crash when parsing type aliases.
...
This was caused by a change in behaviour in Clang - a8770a7e8e
(SVN revision 346146).
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
e10fc01bff
Changed type maps to only return types - no strings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
ef0b054301
Split Parser::ParseHeader into helper methods.
...
Use clang::SemaConsumer interface callback to walk over the parsed AST.
This deals with a nasty bug that occurs when processing late-parsed template declarations.
The clang::Parser object life is tied to clang::ParseAST function, so we need to process the AST in the callback.
Fixes https://github.com/mono/CppSharp/issues/1123 and (hopefully) https://github.com/mono/CppSharp/issues/1124 .
7 years ago
Dimitar Dobrev
3917ca2584
Fixed renaming when items of an enum only differ by case.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Matthew Albrecht
f8ccbb80c0
Added parameter index to managed marshal variables
7 years ago
Rokas Kupstys
d8b53721ef
Fix for #1043 ( #1044 )
...
Field property getter returns non-value types by reference instead of by copy.
Fixes #1043
* Minor code clarity cleanup in GenerateFieldSetter. No behavior changed.
* Fix incorrect code generated in some cases.
* Test for fields getters returning references.
8 years ago
Dimitar Dobrev
67b241d95b
Added support for 16-bit wide characters (char16_t).
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
fceb204a98
Fixed the generated C# for members of types nested in templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
8cc67420d5
Fixed a crash when passing null as an std::string on Unix. ( #1012 )
...
Fixed a crash when passing null as an std::string on Unix
8 years ago
Dimitar Dobrev
9c2f62c3eb
Fixed a crash when parsing unnamed declarations in name-spaces.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
bea0653268
Fixed code generation for using template types.
...
Thanks to @zillemarco for coming up with the test case.
8 years ago
Dimitar Dobrev
4b374c9084
Fixed the generated C# for two anonymous types nested in another anonymous type.
...
Fixes https://github.com/mono/CppSharp/issues/931 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
358650a155
Enabling empty arrays of non-primitives only when not using MSVC.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
ec66216345
[generator] Ignore zero-sized constant C array types.
8 years ago
Dimitar Dobrev
046c428852
Fixed the binding of multiple identical function pointers with a calling convention.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
8a2e813445
Merged Delegate Pass and pass for Anonymous Delegates and added the following improvements alongwith.
...
1. Got rid of Anonymous Names.
2. Merged the common code for Delegate Generation.
3. The delegate pass also works for C++/CLI now.
4. Fixed the calling conventions of delegates for both, C++/CLI and C#.
5. Ensures that if a delegate is used for a virtual as well as something else, it finally ends up as public.
6. Fixed the code generation when the return type of a method is a function pointer that has been used somewhere else as well.
7. Added Access and Calling convention to the delegate definition.
The only thing left is to get rid of the hack used, i.e move the code in VisitFunctionDecl to VisitParametersDecl. Somehow, it's not working right now.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
973fdafdfe
Generated properties from setters returning Booleans.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f33b162f6f
Ignored inlined name-spaces in the C# gen only.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
09e568d0b3
[generator] Improved processing for C++ inline namespaces.
8 years ago
Joao Matos
9c83f88c7f
[generator] Fixed regression ignoring function templates.
8 years ago
Dimitar Dobrev
a056659d09
Generated properties from <type> get()/void get(<type>) pairs.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f9a8798b8f
Fixed the generated C# for setters with a reference to a primitive type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
8b9c3ab89f
Fixed a regression when a public virtual is overridden as private.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
49104ee0bf
Added a test for getting bases of ignored overrides in secondary bases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cece243a06
Equalised the access of overrides and their base methods.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
2002377f27
Fixed the generated C# when a protected constructor has a parameter with a protected type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Kimon Topouzidis
01677b0cb1
Fixed the generated #includes when renaming output files. ( #887 )
...
Fixes #868
8 years ago
Mohit Mohta
49e94460a5
Fixes Stack mismatch when bool param passed from C++ to C#
...
Fixes #834
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
9f4d501d0b
Fixed a regression of overridden setters not turning into properties.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
65d5037a72
Fixed the generation of C# for Virtual function with std::string params ( #878 )
...
Fixes #877
8 years ago
ktopouzi
75b96143d2
Used packing when laying marshalling structures out sequentially.
...
Fixes https://github.com/mono/CppSharp/issues/772 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Kimon Topouzidis
1298634804
Extended declarations to store their packing. ( #871 )
8 years ago
Dimitar Dobrev
422b98a0fd
Enabled the tests for std::string.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cfc6da4600
Fixed the generated C# when a field is named after a property to be generated.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
37adb3efc9
Fixed the binding of indexer overloads when there's more than one class key.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
c740a34dfa
Fixed the binding of a copy ctor when a move ctor exists too.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Kimon Topouzidis
551d208044
Added half to the marshalling structures in the C# generator. ( #854 )
8 years ago
Kimon Topouzidis
797cacadb8
Added long doubles to the marshalling structures in the C# generator. ( #842 )
8 years ago
Dimitar Dobrev
f549b63711
Removed the useless and problematic mapping of typedef-ed classes to empty ones.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
3ac96ac8f2
Extract default common visit code into base TypePrinter class.
8 years ago
Joao Matos
11f1956cde
Remove CLITypePrinterContext and its usage in CLITypePrinter.
8 years ago
Joao Matos
38cb8e1dbe
Overhaul type printer and marshal contexts design and implementation.
...
The goal is to simplify the design and get rid of useless type printer contexts inside type printers.
8 years ago
Abhinav Tripathi
91fcfd0b5c
Fix CheckStaticClass pass and add test. ( #795 )
8 years ago