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
Dimitar Dobrev
0c87a77311
Fixed the generated C# for constant references to primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
2fe8d21f21
Upgraded the CI script to use Ubuntu 16.04.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8feac37ae1
Fixed ambiguity when the type of a parameter is mapped to a type in an overload.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8c394afd86
Simplified a type map in the tests.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8536fc9ba7
Clarified the renaming of members.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
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
Dimitar Dobrev
fcb3b93f55
Fixed the generated C# for destructors of abstract classes.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
9908c746f4
Stopped using methods deprecated in recent Clang.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
f254951b03
Excluded many unused modules when building LLVM and Clang.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
9ed3c79d9d
Worked around a missing symbol from a template specialization on macOS.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8f96b8e1bc
Worked around a missing symbol from a template specialization on macOS.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
c8536b4141
Updated to LLVM/Clang revisions 339502/339494 respectively.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
92da301135
Fixed the generation when a secondary base is used in more than one unit.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
João Matos
4a34af1b56
Fixed debugger display variable reference in Block class.
...
Fixes https://github.com/mono/CppSharp/issues/1113
7 years ago
Dimitar Dobrev
6a28909dd5
Documented the release of CppSharp 0.8.21.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
9bd8535f18
Only generate the system module in C# generators.
7 years ago
Joao Matos
6881a583d8
Fixed missing save of generated module template to outputs.
7 years ago
Joao Matos
fb31a85b90
Fixed code generator to generate system module even in single file per unit mode.
7 years ago
Joao Matos
5a1db5268e
Silence verbose duplicate constructor and operator warnings.
7 years ago
Joao Matos
d5e6e11046
Improve the defaults of necessary generation options to improve accessibility.
7 years ago
Joao Matos
b2b5567c7f
Call the parser setup code in CLI and get rid of specific Mac parser setup code.
7 years ago
Joao Matos
94ef299378
Only include header files when scanning directories in CLI.
7 years ago
Joao Matos
5352b6f8b0
Minor code readability refactor.
7 years ago
Dimitar Dobrev
7669dfc752
Documented the release of CppSharp 0.8.20.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
d660e06dfb
Documented the release of CppSharp 0.8.19.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
2d57c787c6
Fixed generation support for pointers to enums in C#.
...
Fixes https://github.com/mono/CppSharp/issues/1093 .
7 years ago
Joao Matos
2a53e079aa
Fixed broken class instance check in FunctionToInstanceMethodPass.
...
Fixes https://github.com/mono/CppSharp/issues/1081 .
7 years ago
Joao Matos
7b0aaf5dda
Improve error handling in case of exceptions in CLI tool driver.
7 years ago
Joao Matos
017e119bd0
Added RTTI flag to the CLI tool.
7 years ago
Joao Matos
1b444fc988
Improved error message on CLI tool.
7 years ago
Matthew Albrecht
f8ccbb80c0
Added parameter index to managed marshal variables
7 years ago
Dimitar Dobrev
9ef1967955
Changed the generated C# for const references to primitives as just primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago