[libcxx-commits] [libcxx] Fix typeinfo for undefined sanitizer (PR #121228)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 27 14:58:08 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 815343e7dd32cc4c5c903ac52daf87aaa4e4cd6e 3d8fb18949dba038667e6d8983948b85a73cefdb --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 a900ccaf7e..6bca852e21 100644
--- a/libcxx/include/typeinfo
+++ b/libcxx/include/typeinfo
@@ -316,7 +316,8 @@ public:
   _LIBCPP_HIDE_FROM_ABI size_t hash_code() const _NOEXCEPT { return __impl::__hash(__type_name); }
 
   // We need to inline this code because otherwise we will get a stack overflow with undefined sanitizer.
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator==(const type_info& __arg) const _NOEXCEPT {
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE _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/121228


More information about the libcxx-commits mailing list