mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 17:46:32 +00:00

This PR cleans up cast-overflow.cpp, more specifically: 1. avoid using undefined value as an exit code (old case `9`) 2. narrowing conversions are allowed to produce `inf` and they are well-defined. Remove dead code (old case `8`) 3. the same applies to the conversion int -> float16. Remove dead code (old case `7`) See also https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#:~:text=%2Dfsanitize%3Dfloat%2Dcast,to%20integer%20types. Currently ubsan doesn't properly detect UB on float16 -> int casts, I have a fix for that (will send as a separate PR).
Compiler-RT ================================ This directory and its subdirectories contain source code for the compiler support routines. Compiler-RT is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. ================================