Extended the ObjectOverridesPass to generate ToString methods if the insertion operator (<<) is overloaded.
Do not generate ToString override for value types - not handled properly in generated code yet.
Merge pull request #250 from azeno/tostring-override

CLI backend - ToString override
Added failing test for the CheckAmbiguousFunctionsPass.

Test shows that all methods get ignored instead of just the two const overloads.
Check for constness first in CheckAmbiguousFunctionPass before doing the check for default parameters.

Fixes test case from previous commit.
Merge pull request #253 from azeno/const-method-overload-fix

Const method overload fix
Added Vagrant file for Linux CI build bot.
Implemented support for pack expansion types in the AST converter.
Implemented support for decayed types in the AST converter.
Fixed InjectedClassNameType layout in the AST.

* Template specialization member is now a pointer so null value works properly
Improved type loc handling when walking types.

We now keep desugaring them until we get to the proper type loc class.
Do not use getFileEntryForID when setting an OriginalPtr for units.

It might not return proper values for <invalid> TUs.
Improve error handling when looking for symbols with Options.CheckSymbols.
Remove PrimitiveTypeExtensions.ConvertToType

C++ types cannot be converted to C# types without knowing details of the
target (e.g. what is the size of "long") and
PrimitiveTypeExtensions.ConvertToType does not handle that correctly.

However, ConvertToType is not used anywhere, so let's just remove it so
that no one will use the method.

We could also fix the method, but it's an extension method for
PrimitiveType, and I don't think such an extension method should be used
for the task, as you would also need to pass it information about the
target system.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Add PrimitiveTypes Long and ULong

The enum PrimitiveType represents, according to the comment, "the C++
built-in types.". However, it does not contain values for C++'s "long"
or "unsigned long", and the parser converts long to int. This is not
correct, and is a problem with 64bit support.

This patch adds Long and ULong values to PrimitiveType, and adds those
to all the switch-cases all around the code. For now Long and ULong are
handled exactly like Int and UInt, so this patch does not change
behavior.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Fix CLITypePrinter's use of Long and ULong

CLITypePrinter outputs C++ code, so the proper type to be written for
Long and ULong are "long" and "unsigned long", not "int" and "unsigned
int".

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Fix CppTypePrinter use of Long and ULong

CppTypePrinter outputs C++ code, so the proper type to be written for
Long and ULong are "long" and "unsigned long", not "int" and "unsigned
int".

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Remove PrimitiveTypes Int8 and UInt8

As enum PrimitiveType is supposed to represent C++ types, having Int8
and UInt8 there is not correct.

This patch removes those values. As Int8 and UInt8 were set to be
equivalent to Char and UChar, we can just change all references to Int8
and UInt8 to Char and UChar.

This doesn't change the behavior, but makes it clearer that the types
for 'char' and 'unsigned char' are not necessarily 8 bits.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Rename PrimitiveType Int16 and UInt16 to Short and UShort

As enum PrimitiveType is supposed to represent C++ types, having Int16
and UInt16 there is not correct.

This patch renames those values to Short and UShort.

This doesn't change the behavior, but makes it clearer that the types
for 'short' and 'unsigned short' are not necessarily 16 bits.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Rename PrimitiveType Int64 and UInt64 to LongLong and ULongLong

As enum PrimitiveType is supposed to represent C++ types, having Int64
and UInt64 there is not correct.

This patch renames those values to LongLong and ULongLong.

This doesn't change the behavior, but makes it clearer that the types
for 'long long' and 'unsigned long long' are not necessarily 64 bits.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>