diff --git a/lib/ClangImporter/ImportDecl.cpp b/lib/ClangImporter/ImportDecl.cpp index 0627a8e5ed4ee..89a59dc397276 100644 --- a/lib/ClangImporter/ImportDecl.cpp +++ b/lib/ClangImporter/ImportDecl.cpp @@ -2544,15 +2544,6 @@ namespace { // constructor available in Swift. ConstructorDecl *defaultCtor = synthesizer.createDefaultConstructor(result); - if (cxxRecordDecl) { - auto attr = AvailableAttr::createUniversallyDeprecated( - defaultCtor->getASTContext(), - "This zero-initializes the backing memory of the struct, which " - "is unsafe for some C++ structs. Consider adding an explicit " - "default initializer for this C++ struct.", - ""); - defaultCtor->getAttrs().add(attr); - } ctors.push_back(defaultCtor); } diff --git a/test/Interop/Cxx/class/inheritance/functions-module-interface.swift b/test/Interop/Cxx/class/inheritance/functions-module-interface.swift index 4ca095c4a7a20..74a7bf2b158f5 100644 --- a/test/Interop/Cxx/class/inheritance/functions-module-interface.swift +++ b/test/Interop/Cxx/class/inheritance/functions-module-interface.swift @@ -136,7 +136,6 @@ // CHECK-NEXT: public func getCopyCounter() -> UnsafeMutablePointer // CHECK-NEXT: public struct CopyTrackedBaseClass { // CHECK-NEXT: public init(_ x: Int32) -// CHECK-NEXT: @available(*, deprecated, message: "This zero-initializes the backing memory of the struct, which is unsafe for some C++ structs. Consider adding an explicit default initializer for this C++ struct.") // CHECK-NEXT: @_transparent public init() // CHECK-NEXT: @discardableResult // CHECK-NEXT: public func getX() -> Int32 @@ -147,7 +146,6 @@ // CHECK-NEXT: public struct CopyTrackedDerivedClass { // CHECK-NEXT: public init(_ x: Int32) -// CHECK-NEXT: @available(*, deprecated, message: "This zero-initializes the backing memory of the struct, which is unsafe for some C++ structs. Consider adding an explicit default initializer for this C++ struct.") // CHECK-NEXT: @_transparent public init() // CHECK-NEXT: @discardableResult // CHECK-NEXT: public func getDerivedX() -> Int32 @@ -167,7 +165,6 @@ // CHECK-NEXT: public struct CopyTrackedDerivedDerivedClass { // CHECK-NEXT: public init(_ x: Int32) -// CHECK-NEXT: @available(*, deprecated, message: "This zero-initializes the backing memory of the struct, which is unsafe for some C++ structs. Consider adding an explicit default initializer for this C++ struct.") // CHECK-NEXT: @_transparent public init() // CHECK-NEXT: @discardableResult // CHECK-NEXT: public func getY() -> Int32 diff --git a/test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift b/test/Interop/Cxx/objc-correctness/pthread_mutexattr_t.swift index d110ef3e9e002..5f100989f5443 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() diff --git a/test/Interop/Cxx/templates/enable-if-module-interface.swift b/test/Interop/Cxx/templates/enable-if-module-interface.swift index e45b90305bbfd..751c840f3c0af 100644 --- a/test/Interop/Cxx/templates/enable-if-module-interface.swift +++ b/test/Interop/Cxx/templates/enable-if-module-interface.swift @@ -3,7 +3,6 @@ // The `init` constructor template is not yet supported in Swift. // CHECK: struct HasConstructorWithEnableIf { -// CHECK-NEXT: @available(*, deprecated, message: "This zero-initializes the backing memory of the struct, which is unsafe for some C++ structs. Consider adding an explicit default initializer for this C++ struct.") // CHECK-NEXT: init() // CHECK-NEXT:}