[llvm] [llvm] `APFloat`: Query `hasNanOrInf` from semantics (PR #116158)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 20:10:44 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 e9aee4fd80874f80556456f64c303ffb957bd614 42160f67225be148e9f24dbb21e9aa84249d02a5 --extensions cpp,h -- llvm/include/llvm/ADT/APFloat.h llvm/lib/Support/APFloat.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 8b9d9af2ca..e82071e5b7 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/116158
More information about the llvm-commits
mailing list