[libcxx-commits] [libcxx] [libc++] Remove -Wpsabi workaround in locale (PR #211330)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 21 15:54:46 PDT 2026


https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/211330

>From fa93c537b8496833af43541295a3a7ad75accb37 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 22 Jul 2026 10:11:08 -0400
Subject: [PATCH] [libc++] Remove -Wpsabi workaround in locale

The diagnostic suppression was needed to silence -Wpsabi on the manually
vectorized code path. This suppression was slated for removal in LLVM 24,
likely because Clang no longer warns about -Wpsabi on [[gnu::always_inline]]
functions in all versions we support.
---
 libcxx/include/__locale_dir/num.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libcxx/include/__locale_dir/num.h b/libcxx/include/__locale_dir/num.h
index 5b3b917384121..195a638d1c07a 100644
--- a/libcxx/include/__locale_dir/num.h
+++ b/libcxx/include/__locale_dir/num.h
@@ -92,16 +92,12 @@ struct __num_get : protected __num_get_base {
     // TODO: Remove the manual vectorization once https://llvm.org/PR168551 is resolved
 #  if _LIBCPP_HAS_ALGORITHM_VECTOR_UTILS
     if constexpr (is_same<_CharT, char>::value) {
-      // TODO(LLVM 24): This can be removed, since -Wpsabi doesn't warn on [[gnu::always_inline]] functions anymore.
-      _LIBCPP_DIAGNOSTIC_PUSH
-      _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wpsabi")
       using __vec   = __simd_vector<char, 32>;
       __vec __cmp   = std::__partial_load<__vec, __int_chr_cnt>(__atoms);
       auto __res    = __vec(__val) == __cmp;
       if (std::__none_of(__res))
         return __int_chr_cnt;
       return std::min(__int_chr_cnt, std::__find_first_set(__res));
-      _LIBCPP_DIAGNOSTIC_POP
     }
 #  endif
     return std::find(__atoms, __atoms + __int_chr_cnt, __val) - __atoms;



More information about the libcxx-commits mailing list