[clang] Fix issue https://github.com/llvm/llvm-project/issues/98018. (PR #99672)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 22 13:51:38 PDT 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 f6e01b9ece1e73f6eda6e1dbff3aa72e917f4007 523f73d029f83b6454ec656042a3fc2c97e72c05 --extensions c,cpp -- clang/lib/Sema/SemaChecking.cpp clang/test/Headers/float.c clang/test/Sema/warn-infinity-nan-disabled-lnx.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 6126c2f97c..adff2567ad 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -8229,7 +8229,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call,
   if ((IsNaNOrIsUnordered || IsSpecialNaN) && FPO.getNoHonorNaNs()) {
     Diag(Call->getBeginLoc(), diag::warn_fp_nan_inf_when_disabled)
         << 1 << 0 << Call->getSourceRange();
-  }  else {
+  } else {
     bool IsInfOrIsFinite =
         IsStdFunction(FDecl, "isinf") || IsStdFunction(FDecl, "isfinite");
     bool IsInfinityOrIsSpecialInf =

``````````

</details>


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


More information about the cfe-commits mailing list