Enum types are not arithmetic, therefore both is_arithmetic and is_unsigned
should be false for them. This change fixes the implementation of is_unsigned
(which was returning true for enums) and adds some more tests. Also adds a test
for enum class to is_arithmetic.
Note that std::is_unsigned is based on the implementation of is_unsigned,
which returns true for enum types. To avoid introducing version differences
between libcxx and clang, the implementation of is_unsigned is left unchanged
here, and an explicit check for __is_enum is added to the implementation of
is_unsigned instead.
clang-format to pass the linter.
With other builtins that have had issues in earlier versions of Clang, such as __is_pointer, we simply disable the fast path before Clang XX. I think we should do that here too. For the most part, the people who care about this type of performance are using ToT. Also, this will greatly reduce the complexity here, so we don't add any more branches to the already complicated implementation. WDYT?