The following program hits a fatal_error in the X86 backend, when the
program is compiled with -mno-sse or -mno-sse2, which is understandable
due to the calling convention:
float f() { return 0.5f; };
since the error occurs in the backend, there are stack traces and bug
report messages that are generated.
This patch allows the compiler to avoid crashing and check in advance if
the code can be generated properly.
- include/clang/Basic/DiagnosticSemaKinds.td: Add the error.
- lib/Sema/SemaChecking.cpp: Check if the function returns a floating-point type.