C++: Introduce unicode char/strings support

Those are the types char16_t and char32_t along with the new
char/string literals u'', U'', u"", u8"", and U"".

This is particularly important for the use of QStringLiteral
since in some platforms it relies on expansion such as above.

Note: The string literals quickfixes still need some tunning.

Task-number: QTCREATORBUG-7449
Change-Id: Iebcfea15677dc8e0ebb6143def89a5477e1be7d4
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Leandro Melo
2012-06-06 13:41:22 +02:00
committed by hjk
parent b88a5f5d38
commit 23c637c4f6
17 changed files with 242 additions and 146 deletions

View File

@@ -2750,6 +2750,18 @@ bool Bind::visit(SimpleSpecifierAST *ast)
_type.setType(control()->integerType(IntegerType::Char));
break;
case T_CHAR16_T:
if (_type)
translationUnit()->error(ast->specifier_token, "duplicate data type in declaration");
_type.setType(control()->integerType(IntegerType::Char16));
break;
case T_CHAR32_T:
if (_type)
translationUnit()->error(ast->specifier_token, "duplicate data type in declaration");
_type.setType(control()->integerType(IntegerType::Char32));
break;
case T_WCHAR_T:
if (_type)
translationUnit()->error(ast->specifier_token, "duplicate data type in declaration");