[libcxx-commits] [libcxx] Try to reproduce ubsan issue (PR #122389)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 10 08:32:50 PST 2025


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 ba704d59569151f1b8b6552ed22a7b840f5e6256 e5be90939cfe4aac7f5c9c949c2d54ecd4de10c1 --extensions  -- libcxx/include/typeinfo
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo
index e88de3ef35..eddf8669bc 100644
--- a/libcxx/include/typeinfo
+++ b/libcxx/include/typeinfo
@@ -315,7 +315,8 @@ public:
 
   _LIBCPP_HIDE_FROM_ABI size_t hash_code() const _NOEXCEPT { return __impl::__hash(__type_name); }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_NOINLINE _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator==(const type_info& __arg) const _NOEXCEPT {
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_NOINLINE _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+  operator==(const type_info& __arg) const _NOEXCEPT {
     // When evaluated in a constant expression, both type infos simply can't come
     // from different translation units, so it is sufficient to compare their addresses.
     if (__libcpp_is_constant_evaluated()) {

``````````

</details>


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


More information about the libcxx-commits mailing list