Dimitar Dobrev
b0aa6e1af0
Removed a useless remnant from an overridden fix.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a65f91949c
Handled int and long in maps to help resolve ambiguity.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
efa11ab745
Simplified type maps by unlinking them from declarations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
55053fddda
Properly hashed types to optimize their storage in maps.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
4adc3d646a
Fixed right-value references creating ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
202ae75df4
Fixed the generated code in a case of ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a4913509eb
Added type maps for primitive strings (pointers to char).
...
const char*, const char16_t* and const wchar_t* in particular.
This enables comparison of types when resolving ambiguity.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
e203463a9d
Added an option for skipping private declarations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
7817b52ce3
Tested indirect calls from native code of overrides in the target language.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
c3629a2aad
Initial support for building under .NET Core.
6 years ago
Dimitar Dobrev
7e3fbc12f0
Updated the CI on Linux to use GCC 7.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
8c2d9ea750
Fixed a possible crash when ordering declarations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
9a12db86d9
Fixed a regression in the generator of C++/CLI.
...
Restored the sorting by order of definition.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
32da859711
Exported all additional symbols on macOS.
...
Many functions in libc++ are marked with _LIBCPP_INLINE_VISIBILITY. This means they are only exported when actually used. This is why exporting just the templates themselves failed to export their functions but listing the functions themselves worked. We need to define _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS to have the functions always exported.
We use _LIBCPP_VERSION to detect if we use libc++ i.e. Clang's standard C++ library.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
e5aaa2ee19
Fixed error handling and message when parsing non-existent files.
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
43bb2ee4bb
Added a type map for char.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dan Shechter
c75d665310
Make Windows10SDK detection more robust
...
- fixes #1145
7 years ago
Dimitar Dobrev
02f70d0b35
Cached found type maps for faster look-ups.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
3b51325f0a
Deleted an unused member in type maps.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8f762da986
Deleted unused and slow code.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
88f118ec4e
Fixed the parsing of functions with integral template args.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
eaf6a8e450
Decreased the build time on the Linux CI.
...
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
21d2dbdbe5
Fixed the build of the parser when its path has spaces.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
1356b9755d
Updated to LLVM/Clang revisions 348759/348755 respectively.
...
This fixes the parsing of the headers for MinGW 7.3.0 64-bit.
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
Dimitar Dobrev
76d8182fe6
Simplified type maps by using static objects to disable as needed.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8427ff8e92
Optimized the walking of the managed AST.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
760caf4d83
Simplified the logic for indentation by using numbers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
b7d3d36ff1
Renamed members related to indentation for more clarity.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
d243780e67
Optimized the generation of C# by not splitting any strings.
...
Our indention of lines in blocks was inadequate so we used to split strings by new lines, indent each line and put it back together. Creation of new strings is incredibly slow so this bogged our code generation down. I have now fixed indention properly and we no longer need to split already written blocks to indent them.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
34ad79529d
Optimized the generation of C# by avoiding splitting.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
37409c7178
Optimized the walking of the ASt by simplifying its search.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
84dec5d745
Removed a condition useless after the fixed late parsing of templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
a73635a497
Clean up re-usage and ownership of diagnostic clients in the parser.
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
Joao Matos
e88b1a8080
Fixed LLVM/Clang tar.gz archive extraction using 7-Zip on Windows.
7 years ago
Joao Matos
f0d3e731ad
Fixed Windows SDK version detection in build scripts.
7 years ago
Joao Matos
e4e3c721ca
Update Git ignore to ignore downloaded LLVM builds.
7 years ago
Joao Matos
7eb12691d3
Update Windows build of Premake to official alpha 13 binary.
7 years ago
Dimitar Dobrev
3346be0084
Resolved ambiguity between char-like types in the generated C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
eec05041a3
Fixed the generated C# for templates with > 1 ctor taking a pointer to a class.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
3ca1579d02
Fixed the generated C# for pure virtual functions with default arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
aef1acb43f
Fixed the generated C# for default arguments of type pointer to a function.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
a1af3d3182
Fixed the generated C# for a certain case of two default parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
dc27c44606
Fixed the generated C# for arguments with default values of "nullptr".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
637018f4d6
Fixed the generated C# for setters with default parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
1420bd9216
Fixed the generated C# for public fields with types mapped to primitive.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago