This patch re-implements `TypeSystemClang::IsFloatingPointType` by forwarding it to `clang::Type::isFloatingType`. The main difference is that the latter returns false for float vector types. The motovation here (apart from implementation simplicity) is that this is currently a foot-gun because most callsites probably don't consider treating float vector types. Callers should test for vectors explicitly using `IsVectorType` (or use `GetTypeInfo`). This patch makes all the callers of `IsFloatingPointType` now check `GetTypeInfo() & eTypeIsFloat`. This is set for float vector types too, so behaviour doesn't change. To make sure we audit all the call-sites in `ValueObject.cpp`, I added a helper `HasFloatRepresentation` (named after the `clang::Type::hasFloatingRepresentation` API), which does the `GetTypeInfo` check, and added a FIXME to it.
138 KiB
138 KiB