Dimitar Dobrev
13b5423fff
Fixed the printing of template specialisations to work in all cases.
...
The previous implementation worked with template specialisation types but not, for example, with template parameter substitution types.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
5a4748f2d0
Handled two or more empty enums with identically prefixed members and in the same context.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
1dd73afda6
Fixed a crash when checking specialisations of std::vector.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
7d67f4b023
Added unary transformations and other fixes to restore the full build with all tests.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
397d82b2a1
Fixed the generated C# when having a field of type char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
2b3b9bc9cf
Fixed a crash when parsing templates of variables.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Joao Matos
b7689b2d60
Added support for missing basic Clang built-in types.
10 years ago
Joao Matos
09a9d17efb
Moved type printing functionality to CppSharp.AST.
10 years ago
Joao Matos
1206b48776
Improved debugging representation of template arguments and specializations.
10 years ago
Joao Matos
4b1309f5be
Added support for C++14 variable templates and specializations.
10 years ago
Joao Matos
53409db5ca
Re-generated the parser bindings.
10 years ago
Joao Matos
2bac142976
Added VisitFunctionTemplateSpecializationDecl visitor implementations.
10 years ago
Joao Matos
12312bff14
Refactored common template handling code in native AST.
10 years ago
Joao Matos
4b8bb474fa
Clean up template declarations visiting behavior.
10 years ago
Dimitar Dobrev
d41609eafb
Marked incomplete class template specialisations and ignored them later.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
7b78053f93
Added compatibility with a little newer Clang.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Joao Matos
9c56b56b68
Rename CLITextTemplate to CLITemplate.
10 years ago
Joao Matos
573dc623f8
Renamed class names to match file renames.
10 years ago
Joao Matos
f6355ab0f9
Renamed some files.
10 years ago
Joao Matos
3f33124287
Re-factored Clang builtin include directory build script code.
10 years ago
João Matos
d03dc8013a
Remove workarounds due to improper handling of Clang builtin include dirs.
10 years ago
João Matos
e5a667afc3
Copy the bundled Clang builtin include files folder to the build folder.
10 years ago
Joao Matos
ab3660cc02
Skip walking implicit C++ records.
10 years ago
Nathan Loofbourrow
d168496cbf
Changes to match clang 3.8.1 API changes
10 years ago
Dimitar Dobrev
b77d2ccdde
Ensured the system module only contains units from the current run.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
91c0a38296
Improved the searching for type maps to work with typedefs and selected mapped template specialisations.
...
This makes it possible to map the exact specialisation of basic_string which corresponds to std::string.
This helps when std::string is used as a placeholder (std::vector<std::string>) since it's then finally resolved to the specialisation and not the typedef.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
87fe62721c
Deleted the redundant and incomplete manual attempts for marshalling std types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
0837094d76
Fixed the generated C# code when a default arg with an ignored expression is preceded by another default arg.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
9d940c8f51
Removed default parameters when they use ignored declarations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
6a0069f9c2
Fixed invalid C# code when wrapping a constant of type std::string.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
5fa6fcca19
Fixed the system module linking itself when auto-compiling.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
4df66454b1
Enabled cleaning up in type maps and used it to dispose of used std::string objects.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
22c15789c5
Changed the searching for declarations to only return relevant ones and to work for variables.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
4b82838b54
Extended the C# end with support for free constants and fixed their printing.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
c1be105d46
Added marshalling of fixed char arrays.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
0ea801f7b9
Fixed the generated code when a default parameter of type char or wide char is assigned an int.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
32122a1bba
Properly handled enumeration items in default values of parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
3cd024cccf
Added marshalling of std::string to the C# end.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
fc87fb6ee9
Added the desugared type, if any, of DependentNameType, to the AST.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
7986747373
Added dependent template specialization types to the AST.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
06410eddbc
Stored specializations in the templated class itself because ClassTemplate is not a complete declaration.
...
ClassTemplate in Clang does not actually represent a complete declaration. For example, let's see the implementation of clang::ClassTemplateDecl::isThisDeclarationADefinition:
bool isThisDeclarationADefinition() const {
return getTemplatedDecl()->isThisDeclarationADefinition();
}
(http://clang.llvm.org/doxygen/DeclTemplate_8h_source.html#l01995 at the time of this commit)
The above shows that class templates do not have definitions, instead, their "definitions" are those of the real templates classes.
In addition let's see ClassTemplateDecl::getCanonicalDecl():
const ClassTemplateDecl *getCanonicalDecl() const {
return cast<ClassTemplateDecl>(
RedeclarableTemplateDecl::getCanonicalDecl());
}
(http://clang.llvm.org/doxygen/DeclTemplate_8h_source.html#l02023 at the time of this commit)
In turn RedeclarableTemplateDecl::getCanonicalDecl() is defined as:
RedeclarableTemplateDecl *getCanonicalDecl() override {
return getFirstDecl();
}
where getFirstDecl() returns just that - the first encountered declaration which might as well be a forward one.
This means that the only complete declaration ClassTemplateDecl can point to is the template class itself,
and the latter is therefore our only choice if we want to have a full list of all specializations of that template class.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
eaef452d52
Stopped ignoring system declarations so that they can be properly parsed.
...
We need this because of the upcoming support for system types, such as std::string or std::vector.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
95b592cab6
Regenerated the C# parser bindings to a single file per target.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
f8863f941b
Extracted the logic for getting wrapped units.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
7f93b4a5bd
Marked incomplete declarations even if their completions cannot be found.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
e57ea530e1
Avoided naming conflicts between methods of different specialisations of a template.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
cc2a283c7f
Fixed the completion of templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
22d823f50a
Fixed a regression when searching for type maps of template specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
010e35abc0
Fixed a crash when generating any C# bindings on Windows.
...
It was a regression from the dropping of the C# option for a single generated source file.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago
Dimitar Dobrev
2881a2805a
Fixed a regression in the completion of records.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
10 years ago