[libcxx-commits] [libcxx] [libc++] Check explicit values in the partial_ordering comparators for better code gen (PR #81366)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 13 02:25:51 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 69fecaa1a455938b0e1acadc582d5126af9f24f5 b4477ecb84ea059227ad58deb6a3fb459688a08d --extensions h -- libcxx/include/__compare/ordering.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/__compare/ordering.h b/libcxx/include/__compare/ordering.h
index e9a9ba5573..acb2856461 100644
--- a/libcxx/include/__compare/ordering.h
+++ b/libcxx/include/__compare/ordering.h
@@ -27,7 +27,7 @@ enum class _OrdResult : signed char { __less = -1, __equiv = 0, __greater = 1 };
 enum class _PartialOrdResult : signed char {
   __less      = static_cast<signed char>(_OrdResult::__less),
   __equiv     = static_cast<signed char>(_OrdResult::__equiv),
-  __greater    = static_cast<signed char>(_OrdResult::__greater),
+  __greater   = static_cast<signed char>(_OrdResult::__greater),
   __unordered = -127,
 };
 

``````````

</details>


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


More information about the libcxx-commits mailing list