* TypeMap: prepare refactoring into a modular design
* TypeMap: refactor C++ backend into common methods
* TypeMap: refactor CLI backend into common methods
* CLI.Gen.cs: fix omitted typemap from previous commit
* Common.Gen.cs: fixed silly modification while testing
* GeneratorKind: add FindGeneratorKindByID method
* TypeMapDatabase: heavy refactor: group typemaps by GeneratorKind
* TypeMap: refactor CSharp backend into common methods + migration
* TypeMap: cleanup patches from previous commits
* TypeMapDatabase: fix passing GeneratorKind to FindTypeMap calls
* Stdlib.CSharp.cs: move std::map typemap from Stdlib.CLI.cs
* TypeMapDatabase: improve parameter name
* feature: Add a mechanism to selectively initialize unmanaged memory in the default constructor. (C# Only at this point).
* Use the global:: prefix when calling InitBlock
Changed Library.GenerateEnumFromMacro and friends to track the primitive type of the Enumeration while building an Enumeration's list of items so that we can support negative items within an Enumeration.
Fixed bugs in GetUnderlyingTypeForEnumValue where "<" should have been "<=" and Long should have been LongLong. Extended it to support negative values.
Added tests.
This fixes a missing specialized method when it has a parameter with type a mapped template which is ignored when dependent.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
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>
* Evaluate expressions when generating enum from macros
ExpressionEvaluator taken from https://github.com/codingseb/ExpressionEvaluator
* Set namespace for enums generated from macros.
* Add Tests
Tests for cases where class name matches translation unit name.
Tests for cases where global constants/functions from different translation units would end up in the value type.
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>
Templates are still experimental and we don't have automatic compilation of C++ symbols so it's risky to always have them enabled.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>