[libcxx-commits] [libcxx] [libc++] Fix ABI break introduced by switching to _LIBCPP_COMPRESSED_PAIR (PR #154686)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 21 08:14:20 PDT 2025
================
@@ -114,7 +114,8 @@ TEST_CONSTEXPR_CXX23 bool test() {
int main(int, char**) {
test();
-#if TEST_STD_VER >= 23
+// TODO: Remove `&& !defined(TEST_COMPILER_CLANG)` once https://llvm.org/PR154567 is fixed
+#if TEST_STD_VER >= 23 && !defined(TEST_COMPILER_CLANG)
----------------
ldionne wrote:
Lets' shift this `#if` over to this test, which IIUC is the only one that actually breaks:
```c++
{
std::unique_ptr<ElemType, DefaultCtorDeleter<ElemType> > p;
assert(p.get() == 0);
assert(p.get_deleter().state() == 0);
}
```
We can do something like
```c++
// TODO: Run this test case unconditionally once https://llvm.org/PR154567 is fixed.
#if defined(TEST_COMPILER_CLANG)
if (!TEST_IS_CONSTANT_EVALUATED)
#endif
{
std::unique_ptr<ElemType, DefaultCtorDeleter<ElemType> > p;
assert(p.get() == 0);
assert(p.get_deleter().state() == 0);
}
```
Also applies to the other tests. IMO this makes it a lot more acceptable to land this patch: we're breaking extremely niche functionality.
https://github.com/llvm/llvm-project/pull/154686
More information about the libcxx-commits
mailing list