From 82530c6e238f2632f9332c78294d84eda5cc7e91 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Thu, 9 Oct 2025 20:04:01 +0100 Subject: [PATCH] [cxx-interop] Adjust the test for default construction of C types `pthread_mutexattr_t` should be getting its implicit default constructor instantiated by Clang. Due to a Clang bug, the constructor was being instantiated, `needsImplicitDefaultConstructor` was being set to `false`, but the constructor wasn't being added to `decl->members()`. This prevented Swift from correctly importing the constructor. This relies on John's change: https://github.com/llvm/llvm-project/pull/161933. rdar://161999293 --- test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift b/test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift index d110ef3e9e002..ac1e6b4fe6a2b 100644 --- a/test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift +++ b/test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift @@ -3,4 +3,4 @@ import Darwin -_ = pthread_mutexattr_t() // expected-warning {{'init()' is deprecated: This zero-initializes the backing memory of the struct}} +_ = pthread_mutexattr_t() // expected-no-diagnostics