[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)

2024-01-31 Thread via cfe-commits
zeroomega wrote: > > Hi, I am seeing breakages on some of our audio code on tip of tree Clang > > and I traced it back to this patch. > > We uses `-ffast-math` mode for performance reasons but we also uses > > `-fhonor-infinities`, `-fhonor-nans` and `fno-finite-math-only` to ensure > > that

[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)

2024-01-31 Thread Aaron Ballman via cfe-commits
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

[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)

2024-01-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Hi, I am seeing breakages on some of our audio code on tip of tree Clang and > I traced it back to this patch. > > We uses `-ffast-math` mode for performance reasons but we also uses > `-fhonor-infinities`, `-fhonor-nans` and `fno-finite-math-only` to ensure > that the

[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)

2024-01-31 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > Hi, I am seeing breakages on some of our audio code on tip of tree Clang and > I traced it back to this patch. > > We uses `-ffast-math` mode for performance reasons but we also uses > `-fhonor-infinities`, `-fhonor-nans` and `fno-finite-math-only` to ensure > that the

[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)

2024-01-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. I'm happy with this. https://github.com/llvm/llvm-project/pull/76873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/76873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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)

2024-01-18 Thread Aaron Ballman via cfe-commits
@@ -2835,6 +2835,9 @@ class Preprocessor { if (Identifier.getIdentifierInfo()->isRestrictExpansion() && !SourceMgr.isInMainFile(Identifier.getLocation())) emitRestrictExpansionWarning(Identifier); + +if (Identifier.getIdentifierInfo()->getName() ==