Jelle
f0b44b4421
Code cleanup and some optimizations ( #1911 )
...
* Code cleanup
* Run symbol conversion in parallel
* Fix build error in p/invoke move
* Fix debug compile
* Address review comments
4 months ago
Jelle
4250c0e318
Fix crashing name mangler ( #1910 )
...
* Fix broken name mangler
* Remove llvm backend mangeling
5 months ago
Jelle
99e5e19e72
Fix crash on nullptr `TemplateTypeParm` decl ( #1901 )
5 months ago
Jelle
c25c7dfadf
Fix debug crash ( #1894 )
...
* Trigger debug break on assert
* Fix crashes in debug builds causing CI to fail
Implementation is based on #1819 .
* Update to actions/<upload/download>-artifact@v4
5 months ago
Henrik Valve
56f1b7c00c
Parsing errors even with release. ( #1886 )
...
Adds two macros to the CppParser/Parser.cpp for custom assert. They print out a message regardless is release or debug enabled. Abort is only called with debug.
Macro `assertm` just prints out the message if the condition is false. Macro `assertml` also prints out the given source location to indicate where parsing fails.
Macro `assertml` is not used often but might be good to be used more.
Also, I removed an assert that seems pointless as if check before it handles it already.
Co-authored-by: HenrikVDestia <henrik.valve@destia.fi>
6 months ago
João Matos
099fadb9a1
ABI handling fixes in Parser.cpp ( #1829 )
...
* ABI handling fixes in Parser.cpp
* Update Parser.cpp
1 year ago
Joao Matos
b5ab95e11d
Update iOS64 ABI name to the more accurate AppleARM64.
1 year ago
Joao Matos
d1307a532f
Add support for AArch64 C++ ABI.
1 year ago
deadlocklogic
9071cd2a59
Implement ClassTemplatePartialSpecialization::Parameters ( #1809 )
...
* Implement ClassTemplatePartialSpecialization::Parameters
* Template.cs: Implement ClassTemplatePartialSpecialization.Parameters
* GeneratorKind: fix bug introduced while migrating from enum to class
* Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter
* regenerated bindings (#1813 )
* regenerated bindings
* regenerated bindings after rebase
* Directory.Build.props: support C# 10.0
* Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter
* Regenerated bindings
* TestAST.cs: add TestASTClassTemplatePartialSpecialization
2 years ago
Joao Matos
17102021cc
Add Method.IsVolatile property.
...
Fixes https://github.com/mono/CppSharp/issues/1761
2 years ago
João Matos
0e1e46836d
Update to Clang 16 for MSVC 2022 support ( #1724 )
...
* support clang 15.0.7
* Fix Premake archive logic to work with official releases.
* Try and upgrade CI to latest OS versions.
* Try and fix LLD link call in parser.
* CI fixes.
* Enable VS 2019 and VS 2022 for LLVM windows workflow.
* Update to a more recent LLVM revision.
* More build fixes.
* Use the system linker for linking symbols libraries outside Windows.
Builtin lld is giving some weird linking errors when linking with the
new LLVM version. We probably need to set some custom options. Using the
system linker should be a better idea anyway, more robust and future
proof.
---------
Co-authored-by: you74674 <you74674@gmail.com>
2 years ago
João Matos
e464da48c8
Bug fixes for GCC 11, cache conversion robustness and error handling ( #1765 )
...
* Fix missing Attribute dtor in GCC 11.
Parser bindings are expecting this, yet this was optimized out under GCC
11.
* Improve error handling for failed library parsing.
* Make the converted declaration cache more robust.
We were getting a failure due to duplicated original pointers. Make it
take the declaration kind into account as a key to the cache.
* Change ConsoleDriver.Run to return a failure bool.
2 years ago
João Matos
626a362698
Add qualified template name to GetCXXRecordDeclFromBaseType. ( #1751 )
2 years ago
João Matos
bb31bd616b
Add type parameter to non-type template parameter decls. ( #1749 )
2 years ago
João Matos
9b06e7bc01
Add C++ WebAssembly ABI ( #1711 )
...
* Minor code refactorings.
* Fix debug assert issue with vtable methods.
* Add support for WebAssembly C++ ABI to parser and AST converter.
2 years ago
josetr
e160b3a296
Add generate function template specializations whitelist
3 years ago
josetr
7fb553f79e
Code to generate function template specializations should support methods as well
3 years ago
josetr
6a414f37c3
Fix SymbolCodeGenerator printing typed enums as normal typeless integers
3 years ago
Joao Matos
5a202e9be2
Support parsing record fields in WalkDeclaration.
...
This fixes an issue with parsing of class fields being used as a
template argument.
3 years ago
Joao Matos
314a1f745f
Parse generate function template specializations.
3 years ago
josetr
fd3f82a7a1
Fix AccessViolationException error when using deduction guides
3 years ago
Dimitar Dobrev
b3d32d8c71
Update LLVM to a newer version
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
f1915b3066
Generate valid C# for templates with external specializations only
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
a69f6d1d6d
Generate valid C++ for specialisations with void
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
25e983606e
Report errors when linking of generated C++ fails
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
2da9e49fe8
Instantiate specialized classes nested in templates
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
3aab30f572
Add built-in compilation of extra symbols
...
Fixes https://github.com/mono/CppSharp/issues/1456 and https://github.com/mono/CppSharp/issues/1253 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
851ec5e44c
Fix instantiation of specializations not to crash
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
8d8c67d3a4
Bind the tag kind (struct, class, enum) of a type
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
99a1457487
Don't evaluate dependent variables
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
34b08efec6
Update LLVM to the latest version
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
strentler
f3fa7eb9ef
Fix for "vector subscript out of range" exception ( #1621 )
...
- The Visual Studio C++ compiler does not allow to access Headers[i+1]
when i+1 points past the last element.
Doing so raises an exception when in
debug mode
Co-authored-by: Christian Kolek <Christian.Kolek@teamviewer.com>
4 years ago
Dimitar Dobrev
0ff9e14226
Update LLVM to the latest version
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
4 years ago
Dimitar Dobrev
f5a46b8e62
Better detect invalid specialized functions
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
9f7098b8ff
Simplify the marking of invalid functions
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Joao Matos
ea05350e54
Update CanCheckCodeGenInfo to check function types as well.
5 years ago
Joao Matos
5ccac5b522
Check for a dependent expression before walking variable initializer.
5 years ago
Dimitar Dobrev
c7fb59769f
Fix all of our warnings in the parser
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
josetr
7791cf6996
Fallback to LayoutKind.Explicit when a custom alignment is specified. ( #1476 )
5 years ago
Dimitar Dobrev
d3135664ca
Expose if a variable is a constant expression
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
75bca17907
Update LLVM to obtain working lld ( #1462 )
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
63459534f9
Update the kind of completed specializations ( #1460 )
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
josetr
eff32320a4
Remove call argument to fix broken build ( #1436 )
5 years ago
josetr
6496bf8dae
Basic support for static constexpr variables ( #1435 )
...
Basic support for static constexpr variables
5 years ago
josetr
a92337ba47
Add support for C++ character literals (u, U, L) ( #1434 )
5 years ago
josetr
8f2fe45f1a
Ignore non-const data() method for std types like basic_string [c++17] ( #1427 )
5 years ago
josetr
8034acb22a
Fix crash when trying to read a CXXRecordDecl that doesn't have a definition ( #1426 )
5 years ago
Dimitar Dobrev
cf29d26b8e
Revert "Add information about linkage to the AST"
...
This reverts commit e061edde76
.
We don't need it after all so let's keep the AST as simple as possible.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
b5ca0635be
Check symbols in tests
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
e061edde76
Add information about linkage to the AST
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago