Add some known built-in types to consider as TYPE_NAME tokens instead of IDENTIFIERs
This commit is contained in:
parent
25f7c43d3b
commit
625410faa0
@ -200,7 +200,22 @@ void observe_type_name(const std::string & type_name)
|
|||||||
type_names.insert(type_name);
|
type_names.insert(type_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char * builtin_types[] = {
|
||||||
|
"__builtin_va_list",
|
||||||
|
};
|
||||||
|
|
||||||
bool is_type_name(const std::string & type_name)
|
bool is_type_name(const std::string & type_name)
|
||||||
{
|
{
|
||||||
return type_names.count(type_name) != 0u;
|
if (type_names.count(type_name) != 0u)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
for (size_t i = 0u; i < sizeof(builtin_types) / sizeof(builtin_types[0]); i++)
|
||||||
|
{
|
||||||
|
if (type_name == builtin_types[i])
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user