Added C++11 keywords / C11 types 'char16_t' and 'char32_t' (#3301)
This commit is contained in:
parent
502ba95383
commit
4e19645d62
|
@ -132,13 +132,10 @@ void Token::update_property_isStandardType()
|
||||||
if (_str.size() < 3)
|
if (_str.size() < 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
static const char * const stdtype[] = {"int", "char", "bool", "long", "short", "float", "double", "wchar_t", "size_t", "void", 0};
|
static const char * const stdtype[] = { "bool", "char", "char16_t", "char32_t", "double", "float", "int", "long", "short", "size_t", "void", "wchar_t"};
|
||||||
for (int i = 0; stdtype[i]; i++) {
|
if (std::binary_search(stdtype, stdtype + sizeof(stdtype) / sizeof(stdtype[0]), _str)) {
|
||||||
if (_str == stdtype[i]) {
|
_isStandardType = true;
|
||||||
_isStandardType = true;
|
_type = eType;
|
||||||
_type = eType;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1714,6 +1714,8 @@ void Tokenizer::fillTypeSizes()
|
||||||
{
|
{
|
||||||
_typeSize.clear();
|
_typeSize.clear();
|
||||||
_typeSize["char"] = 1;
|
_typeSize["char"] = 1;
|
||||||
|
_typeSize["char16_t"] = 2;
|
||||||
|
_typeSize["char32_t"] = 4;
|
||||||
_typeSize["bool"] = _settings->sizeof_bool;
|
_typeSize["bool"] = _settings->sizeof_bool;
|
||||||
_typeSize["short"] = _settings->sizeof_short;
|
_typeSize["short"] = _settings->sizeof_short;
|
||||||
_typeSize["int"] = _settings->sizeof_int;
|
_typeSize["int"] = _settings->sizeof_int;
|
||||||
|
|
Loading…
Reference in New Issue