[llvm] [clang] [clang-tools-extra] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 01:46:44 PST 2024


AaronBallman wrote:

> Is this expected and wanted?

Good catch! I would not expect that diagnostic; we should silence the diagnostic if it's used in a `#ifdef`, `#elifdef`, or `defined` because the value isn't necessary. Perhaps we should also silence something like `sizeof(INFINITY)` because it's unevaluated?

https://github.com/llvm/llvm-project/pull/76873


More information about the cfe-commits mailing list