[clang] [llvm] [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 llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 12:04:48 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?
> > >
> > >
> > > Thanks @mikaelholmen and @AaronBallman. I will take a look and create a PR to fix the issue.
> >
> >
> > Hi @zahiraam ! Did you get anywhere with this?
>
> Sorry! I didn't have time to work on it yet. I should probably get to it next week.
Because these changes made it into 18.x and we're already seeing feedback about the diagnostic quality, I think we need to either revert the changes for the moment (both on main and on 18.x) or we need to commit to getting the fix as quickly as possible (and backport it to 18.x). I'd like to avoid getting into a situation where we're reverting this on 18.x later in the cycle. How about this for a plan: if there's not a fix committed by EOD Mon (2/5), we revert so that rc2 goes out in a good state (rc2 is being cut on Tue the 6th)?
https://github.com/llvm/llvm-project/pull/76873
More information about the llvm-commits
mailing list