[llvm] [llvm] `APFloat`: Add helpers to query NaN/inf semantics (PR #116315)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 18:02:47 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 17bc738324274f1cf54d30552d65751d216e7ad0 64568e53598b93407864583d0713376a61801312 --extensions cpp,h -- llvm/include/llvm/ADT/APFloat.h llvm/lib/Support/APFloat.cpp llvm/unittests/ADT/APFloatTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index c633403123..11636bdc9b 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -376,8 +376,8 @@ bool APFloatBase::semanticsHasSignedRepr(const fltSemantics &semantics) {
}
bool APFloatBase::semanticsHasInf(const fltSemantics &semantics) {
- return semantics.nonFiniteBehavior != fltNonfiniteBehavior::NanOnly
- && semantics.nonFiniteBehavior != fltNonfiniteBehavior::FiniteOnly;
+ return semantics.nonFiniteBehavior != fltNonfiniteBehavior::NanOnly &&
+ semantics.nonFiniteBehavior != fltNonfiniteBehavior::FiniteOnly;
}
bool APFloatBase::semanticsHasNaN(const fltSemantics &semantics) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/116315
More information about the llvm-commits
mailing list