Dimitar Dobrev
3caa8c5da2
Restore removed specializations
...
All specializations which only use pointers as their type arguments need at most one internal representation since pointers are mapped to IntPtr. This was achieved by removing the unneeded specializations from their containing list. This was, however, a bug because specializations were thus removed not only as internal structures but in their entirety.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
3ea7e97241
Re-generated the parser bindings and bootstrap code.
6 years ago
Dimitar Dobrev
926e8ab343
Regenerate the parser bindings
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Joao Matos
02955f913d
Added statement visiting to IAstVisitor.
6 years ago
Joao Matos
a4ed8a5204
Re-generated the AST bootstrap code with visitors and abstract classes.
6 years ago
Dimitar Dobrev
01a24182d7
Changed expressions to use properties.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
be0d9494fd
Exposed many more properties of expressions.
...
They were previously hidden by a bug in the pass for properties fixed since.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
9840d8a267
Added the new default values based on expressions, to parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
5559ef47c7
Added support for values in more literal expressions.
7 years ago
Joao Matos
8bf27c43e5
Skip ignored bases in `ClassExtensions.GetBaseProperty`.
7 years ago
Joao Matos
8057040c0c
Added `StripConst` extension method to `QualifiedType`.
7 years ago
Joao Matos
06ddf85b4f
Added managed AST conversion code for statements and expressions.
7 years ago
Joao Matos
6ef3f993c5
Generate the parser managed code for expressions and statements.
7 years ago
Joao Matos
aa73692543
Obsolete managed expression class machinery.
7 years ago
Joao Matos
f642cefe5f
Move `ITypePrinter` from `AST` to `Generator`.
7 years ago
Joao Matos
6dfd16ba9b
Move `CppTypePrinter` to generators and inherit from `TypePrinter`.
7 years ago
Joao Matos
0c90db02e4
Changed `BaseClassSpecifier` to inherit from `DeclarationBase`.
7 years ago
Joao Matos
24213ffbc7
Extract `Declaration` base code into `DeclarationBase`.
7 years ago
Joao Matos
1953f8f61f
Fixed a crash with `TranslationUnit.FileName` property.
7 years ago
Joao Matos
96cfb37aab
Implement `CppTypePrinter.VisitPrimitiveType(PrimitiveType, TypeQualifiers)`.
7 years ago
Joao Matos
2296f8b63c
Added some helper methods in `Enumeration` to work with scoped enumerations.
7 years ago
Joao Matos
d77c6559d5
Remove `VisitDeclaration` calls when visiting translation units.
...
This causes the `VisitNamespace.VisitDeclaration` to early out, so just remove this as its redundant.
7 years ago
Dimitar Dobrev
bc7f20a10a
Fixed the generated C# when an instance method has a parameter named "instance".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
d97016fe3c
Fixed the generated C# for indexers in templates specialized with void*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
e2a23b8987
Fixed the generated C# when returning a non-const char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
efa11ab745
Simplified type maps by unlinking them from declarations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
55053fddda
Properly hashed types to optimize their storage in maps.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
4adc3d646a
Fixed right-value references creating ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
202ae75df4
Fixed the generated code in a case of ambiguous overloads.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
a4913509eb
Added type maps for primitive strings (pointers to char).
...
const char*, const char16_t* and const wchar_t* in particular.
This enables comparison of types when resolving ambiguity.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
c3629a2aad
Initial support for building under .NET Core.
7 years ago
Dimitar Dobrev
8c2d9ea750
Fixed a possible crash when ordering declarations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
9a12db86d9
Fixed a regression in the generator of C++/CLI.
...
Restored the sorting by order of definition.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
43bb2ee4bb
Added a type map for char.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
e10fc01bff
Changed type maps to only return types - no strings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8427ff8e92
Optimized the walking of the managed AST.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
37409c7178
Optimized the walking of the ASt by simplifying its search.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
c8536b4141
Updated to LLVM/Clang revisions 339502/339494 respectively.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
5352b6f8b0
Minor code readability refactor.
7 years ago
Dimitar Dobrev
9ef1967955
Changed the generated C# for const references to primitives as just primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
695a7538d1
Made the checking if a type is const char* universally accessible.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
10c8211a7c
Fixed the generated C# when a template interface specialised with another specialisation returns a template parameter.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
ae9eede6f1
Fixed a crash when a constructor takes a template or specialisation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
4b310875d3
Enabled classes having specializations for secondary bases to call their extensions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
0ea147b1e3
Fixed the generated C# for templated indexers specialised with enums.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
3dba1eb594
Exported entire specialisations when they only have valid functions.
...
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>
8 years ago
Rokas Kupstys
a03a0ea0c5
Add `IgnoreConversionToProperty(pattern)` and `ForceConversionToProperty(pattern)`.
8 years ago
Rokas Kupstys
d7682ef6d4
Add ability for managed module wrapper to reference extra assemblies.
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