Dimitar Dobrev
84dec5d745
Removed a condition useless after the fixed late parsing of templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
a73635a497
Clean up re-usage and ownership of diagnostic clients in the parser.
8 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 .
8 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>
8 years ago
Dimitar Dobrev
9908c746f4
Stopped using methods deprecated in recent Clang.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
9ed3c79d9d
Worked around a missing symbol from a template specialization on macOS.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
8f96b8e1bc
Worked around a missing symbol from a template specialization on macOS.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
c8536b4141
Updated to LLVM/Clang revisions 339502/339494 respectively.
...
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>
9 years ago
Dimitar Dobrev
cdc2e73f84
Fixed the generated C# when a template is nested in another.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
573818f33e
Fixed a regression, a crash, when generating the parser bindings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Rokas Kupstys
aa33609d45
Clean up linux includes setup.
...
Includes setup was moved to ParserOptions.cs and is used just like `SetupMSVC()` and `SetupXcode()`. Native compiler is queried for it's type and version. Correct include paths are set up in cases where system has multiple compilers installed as well.
9 years ago
Rokas Kupstys
1cac2e0d78
Enable cxx11 abi for GCC 4.9+ on linux.
...
GCC version is checked, if version is 4.8 or lower then cxx11 ABI is disabled. Added new `--no-cxx11-abi` option. It explicitly disables cxx11 ABI even on new compilers. This option is also taken into account when building LLVM.
9 years ago
Dimitar Dobrev
a097cdd437
Fixed a crash when the body of a templated function contains references to non-functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
ed0c21aa4b
Regenerated the parser bindings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Rokas Kupstys
05445f3028
Linux fixes, Bootstrap.cs build errors, warnings ( #1010 )
...
* Fix warnings about unused variables
* Fix linux include paths in ParserGen and CLI generator.
Remove parsing of `CppSharp.CppParser.lib` as it is not used.
* Fix build errors in CppSharp.Parser.Bootstrap target.
9 years ago
Dimitar Dobrev
97e24602c3
Fixed a possible crash when instantiating template functions in the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
853e82f095
Fixed the generated C# for specialisations only used as type arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
4d3c02e6e5
Validated bodies of instantiated template functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
faf0fbb656
Included template specialisations only used as returned types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
aed21bed67
Included the destructor of std::allocator to the C++ symbols.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
e53b25346e
Prevented C++ generation for invalid specialised functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
481bbc0351
Updated to LLVM/Clang revisions 318543/318538 respectively.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
450a26a443
Revert "Removed an unused field and redundant parameters from the parser."
...
This reverts commit 51a109d2db .
# Conflicts:
# src/CppParser/CppParser.cpp
# src/CppParser/CppParser.h
# src/CppParser/Parser.cpp
# src/CppParser/Parser.h
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
254cc0d279
Simplified the getting of the target info in the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
33bc64ad9a
Reused the parsing of headers to get the target info as well.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
3abe0e5195
Deleted an useless field from the parser options.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
28f42bb1c7
Deleted useless fields from the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
51a109d2db
Removed an unused field and redundant parameters from the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
4945b595de
Renamed SetupHeader to Setup in order to generalise it for future extension.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
9c2f62c3eb
Fixed a crash when parsing unnamed declarations in name-spaces.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
310f1110df
Handled any level of nesting when generating internals for specialisations in C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
5ca93458a2
Fixed the generation of internals for template specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
feb2df8fae
Completed just class template specialisations used in functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
b7faf33819
Fixed a regression of generating templates in C# with the option off.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
e96580357e
Optimised the parser by skipping the system translation units.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
5bce2fb533
Reused parameters between functions and their types (as Clang does).
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
c61c989460
Added an option for specifying STD types to bind.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
291da4ece3
ed time and memory during generation by skipping methods of most STD classes.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
ada983c40d
Improved the check for a layout on a record.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
c3048ae8d8
Fixed a crash when trying to get a source location for an implicit declaration.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
ae6a37359a
Removed unused STD enumerations from generation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
7623adc9fb
Made only really used classes internal.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
405d82fede
Fixed a typing error in the name of a function.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
bc4e01b58b
Revert "Skipped completion of already complete template specialisations."
...
This reverts commit 99da13e643 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
99da13e643
Skipped completion of already complete template specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
b41b96df77
Fixed a regression causing generated types to be incorrectly reordered.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Dimitar Dobrev
cd5b57a786
Ensured all non-system template specialisations are complete.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago
Marco Zille
5eb077b5d4
Fixed a problem when walking the managed AST because friend templated
...
classes were seen as declared multiple times and resulted into a crash. Solves #975 .
9 years ago
Dimitar Dobrev
2d8e87188b
Simplified the completion of declarations in the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
9 years ago