Skip to content

Commit 82530c6

Browse files
committed
[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: llvm/llvm-project#161933. rdar://161999293
1 parent 3ce1d11 commit 82530c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
import Darwin
55

6-
_ = pthread_mutexattr_t() // expected-warning {{'init()' is deprecated: This zero-initializes the backing memory of the struct}}
6+
_ = pthread_mutexattr_t() // expected-no-diagnostics

0 commit comments

Comments
 (0)