Rokas Kupstys
944c9f4f7f
Enable debug information generation for all tests.
8 years ago
Rokas Kupstys
9ea1821cb3
Fix debug output not being generated when AST element had no comment.
...
Also debug text cleaning moved to CodeGenerator.cs and is done when printing bindings. New lines are not stripped out, instead each line is prepended with "// DEBUG: ". Now debug info is properly formatted, easy to read and full.
8 years ago
Rokas Kupstys
86f2c59ec5
Tweak linux include dirs, previous change broke GCC7 include dirs on archlinux.
8 years ago
Rokas Kupstys
7a3adcd401
Some linux distributions use `major.minor.patch` and some use `major.minor` for versioning include dirs. Add them all.
8 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.
8 years ago
Rokas Kupstys
0b99682341
Consistent class/struct keywords fixed for cases where wrapper class would contain members from several different translation units.
8 years ago
Rokas Kupstys
1165b3020e
Fix debug output breaking generated binding code.
8 years ago
Rokas Kupstys
e6c6346860
Completely remove `GenerateUnformatted()` method.
8 years ago
Rokas Kupstys
9c64e443f8
Always generate formatted code.
8 years ago
Rokas Kupstys
03f7f62e95
Fix `Delegates` namespace being not generated.
...
In some cases `Delegates` namespace could be attached to a namespace which is not wrapped and as a result of that `Delegates` namespace was also not generated in wrapper code resulting in a wrapper build errors. Change adds extra logic which tries to find the correct library namespace if more than one namespace is present.
8 years ago
Rokas Kupstys
555c51589e
Consistently declare classes/structs. Fixes issue where compilation error is produced due to file name containing constants matching class marked as value type.
8 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.
8 years ago
Dimitar Dobrev
3c55f7fb9e
Worked around a bug in the Mono C# compiler when casting generics.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 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>
8 years ago
Dimitar Dobrev
caacaa841f
Worked around duplication of types nested in templates and forwarded.
...
Since all template specialisations are incomplete by default, so are classes nested in them. When such classes are also forwarded, there are two incomplete declarations with the same name and in the same scope. Our parser searches by name and completion and it can therefore not make a difference between the two. Consequently, it always returns the first type it finds even if it isn't the right one. When clang::Sema later completes the specialisations, it completes the nested types too which leads to two identical complete types in the same scope.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
ed0c21aa4b
Regenerated the parser bindings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
8cc67420d5
Fixed a crash when passing null as an std::string on Unix. ( #1012 )
...
Fixed a crash when passing null as an std::string on Unix
8 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.
8 years ago
Dimitar Dobrev
fd73bef752
Fixed a crash when there are parsing errors.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
5313dea5c4
Fixed the collection of additional symbols to ignore warnings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
e8e100be7b
Fixed the generated C# when a constructor takes a specialisation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
97e24602c3
Fixed a possible crash when instantiating template functions in the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
4eb8ee83da
Fixed the generated C# for templates with fields other templates not used anywhere else.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a913a74138
Fixed the generated C# when using std::map.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
4bfece6ab9
Fixed the generated C# for specialisations with an ignored specialisation as an arg.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
853e82f095
Fixed the generated C# for specialisations only used as type arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
d996d8a4d0
Removed extensions for internal template specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
35902635ff
Fixed the parsing of an undeclared template specialisation with an extension method.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
4d3c02e6e5
Validated bodies of instantiated template functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
73e11e7c32
Added a new field acessor synth kind.
8 years ago
Joao Matos
d0e1fe5810
Improved IsSynthetized check to handle property setters.
8 years ago
Joao Matos
f9e0ec52de
Remove extra new line.
8 years ago
Joao Matos
39749ee0b7
Improve get base method and property methods to work with generalized declarations.
8 years ago
Joao Matos
fbd67eb6f8
Added AssociatedDeclaration to Declaration copy constructor.
8 years ago
Dimitar Dobrev
faf0fbb656
Included template specialisations only used as returned types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
aed21bed67
Included the destructor of std::allocator to the C++ symbols.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
e53b25346e
Prevented C++ generation for invalid specialised functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mikulas Florek
04a1591e84
Fixed the generated C# for fixed arrays of Booleans.
...
fixes #1004
* mend
Fixed the generated C# for fixed arrays of Booleans
8 years ago
Dimitar Dobrev
481bbc0351
Updated to LLVM/Clang revisions 318543/318538 respectively.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
426572bc8a
Generalized method fields to declaration associations.
8 years ago
Joao Matos
ecbe317b09
Improved debugging display for declarations.
8 years ago
Joao Matos
f334e447be
Added optional visiting of property accessors.
8 years ago
Joao Matos
09199381c9
CodeGenerator is now an IAstVisitor.
8 years ago
Dimitar Dobrev
3b43a0b168
Cleaned up the additional parser options after parsing headers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 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>
8 years ago
Dimitar Dobrev
254cc0d279
Simplified the getting of the target info in the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 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>
8 years ago
Dimitar Dobrev
3abe0e5195
Deleted an useless field from the parser options.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
28f42bb1c7
Deleted useless fields from the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
51a109d2db
Removed an unused field and redundant parameters from the parser.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago