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
Dimitar Dobrev
17b8e9800f
Find libraries even when given with no extensions
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
07763331e2
Move libraries to a new class for linking options
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
fe4a466964
Fix parsing of member pointers with MSVC
...
Fixes https://github.com/mono/CppSharp/issues/1231 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
9091fd3e5b
Do not add type alias templates twice to the AST
...
This also fixes a memory leak since the copies were never destroyed.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
a1dc53c03c
Add template functions to their context
...
This also fixes a minor memory leak.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
a25162b6d8
Fix leaking memory by removing a useless assignment
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
e3237780bf
Delete an unused parameter in the parser
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
bcdc2cf667
Fix leaking the memory of an entire Clang AST
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
João Matos
6a007e6d60
Implement basic support for parsing function-like macros.
5 years ago
Dimitar Dobrev
78ed7c72a1
Clean all C++ warnings in the parser
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
7fc681a41d
Ensure complete template specializations in AST
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
João Matos
c21ddcca1e
Implement parsing and AST processing of C++ deprecated attributes.
5 years ago
Dimitar Dobrev
c80986e04e
Always keep default constructors in the AST
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
40cd49ac37
Keep copy/move constructors and assignment in AST
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
8b0aecef9b
Instantiate exception specifications before reading
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
299cb912cc
Update LLVM to the latest version
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
5 years ago
Dimitar Dobrev
709fcb6f7e
Work around MSVC 32 crashing reading of exported symbols in Mach-O
...
See https://bugs.llvm.org/show_bug.cgi?id=44433 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
eab2620c18
Update LLVM to the latest version.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
Signed-off-by: Joao Matos <joao@tritao.eu>
6 years ago
Joao Matos
ac7bdb2585
Refactor Clang builtins directory logic and move it to the managed side.
...
This now matches systems Clang includes order on macOS which fixes a bug.
Signed-off-by: Joao Matos <joao@tritao.eu>
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
29c0b8593a
Print the parser target triple in verbose mode.
...
Signed-off-by: Joao Matos <joao@tritao.eu>
6 years ago
Joao Matos
7df1623e6d
Cleanup Clang resource directory lookup logic.
...
Now the logic is more standard across platforms, we always re-use the builtin bundled headers.
Fixes https://github.com/mono/CppSharp/issues/1259 .
6 years ago
Joao Matos
c5bcb48cc2
Implement UnresolvedUsingType and UnresolvedUsingTypename.
...
Fixes https://github.com/mono/CppSharp/issues/1235 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
17cc96bafd
Regenerate the parser bindings
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
6e963c1033
Remove useless creation of managed std::strings
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
547a9f2819
Fix the passing of std::string by value
...
std::string has a non-trivial copy constructor which was erroneously ignored.
Fixes #867 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
72368d5050
Fix returned objects by value attributed with inalloca
...
For more details see https://llvm.org/docs/InAlloca.html . This specific crash happened on Win 32 only.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
1fc1b4ec51
Fix default arguments to only map to null if pointers
...
This bug is revealed by properly fixing the reading of ABI parameters in the parser.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
c579b65a3b
Update LLVM/Clang
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a9bfe1c31f
Support indirect parameters
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
3eee343554
Add parsing and AST support for RecordArgABI information in class records.
6 years ago
Joao Matos
ea7023dfad
Remove ParserOptions.Abi since its misleading as it serves no purpose.
6 years ago
Joao Matos
f35bd75563
Improved robustness when parsing C++ ABI kind.
...
Fixes https://github.com/mono/CppSharp/issues/1202 .
6 years ago
Joao Matos
378c9b301e
Added support for parsing function bodies (and option `SkipFunctionBodies`).
6 years ago