示例#1
0
文件: type.c 项目: oliwer/cparser
bool is_type_integer(const type_t *type)
{
	assert(!is_typeref(type));
	if (!is_type_arithmetic(type))
		return false;
	return test_atomic_type_flag(type->atomic.akind, ATOMIC_TYPE_FLAG_INTEGER);
}
示例#2
0
文件: type.c 项目: oliwer/cparser
bool is_type_signed(const type_t *type)
{
	assert(!is_typeref(type));
	if (!is_type_arithmetic(type))
		return false;
	return test_atomic_type_flag(type->atomic.akind, ATOMIC_TYPE_FLAG_SIGNED);
}
示例#3
0
bool is_type_scalar(const type_t *type)
{
	assert(!is_typeref(type));

	if (type->kind == TYPE_POINTER)
		return true;

	return is_type_arithmetic(type);
}