r242675 changed the signature for the signbit builtin but did not introduce proper semantic checking to ensure the arguments are as-expected. This lead to regressions like the one reported in PR28172 where codegen would crash. This patch addresses this by properly grouping the signbit builtins along with the other fp classification builtins.
The checking by itself looks sane-ish, but i don't have any reasonable knowledge in this area.
The name of the function is unfortunate given that you call it for __builtin_signbit(int).
Hm, is __builtin_signbit() taking an integer, or float?
1 will be promoted to float?
Same, would be good to see __builtin_signbitf(1.0);, __builtin_signbitf(1.0L);.
Updating based on review feedback.
signbit() is an FP classification macro (see C17 7.12.3 "Classification macros"), so I don't think the name is unfortunate.
It accepts a floating-point type.
It turns out that double and long double were fine, but the promotion from float for this case was a problem. I fixed that as well.