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

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 05:10:29 PST 2024


zahiraam 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?

Thanks @mikaelholmen and @AaronBallman. I will take a look and create a PR to fix the issue.

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


More information about the cfe-commits mailing list