Skip to content

Commit be02adb

Browse files
committed
Revert "PrintAsObjC Test: Test pointer types with @cdecl"
This reverts commit f6dd432.
1 parent 8324040 commit be02adb

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

test/PrintAsObjC/cdecl-official.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
//--- Lib.swift
2323

24-
// CHECK-NOT: assume_nonnull
25-
2624
// CHECK: #if defined(__cplusplus)
2725
// CHECK: extern "C" {
2826
// CHECK: #endif
@@ -45,23 +43,6 @@ func c_keywordArgNames(auto: Int, union: Int) {}
4543
func d_returnNever() -> Never { fatalError() }
4644
// CHECK-LABEL: SWIFT_EXTERN void return_never(void) SWIFT_NOEXCEPT SWIFT_NORETURN;
4745

48-
/// Pointer types
49-
// CHECK: /// Pointer types
50-
51-
@cdecl("pointers")
52-
func f_pointers(_ x: UnsafeMutablePointer<Int>,
53-
y: UnsafePointer<Int>,
54-
z: UnsafeMutableRawPointer,
55-
w: UnsafeRawPointer,
56-
u: OpaquePointer) {}
57-
// CHECK: SWIFT_EXTERN void pointers(ptrdiff_t * _Nonnull x, ptrdiff_t const * _Nonnull y, void * _Nonnull z, void const * _Nonnull w, void * _Nonnull u) SWIFT_NOEXCEPT;
58-
59-
@cdecl("nullable_pointers")
60-
func g_nullablePointers(_ x: UnsafeMutableRawPointer,
61-
y: UnsafeMutableRawPointer?,
62-
z: UnsafeMutableRawPointer!) {}
63-
// CHECK: SWIFT_EXTERN void nullable_pointers(void * _Nonnull x, void * _Nullable y, void * _Null_unspecified z) SWIFT_NOEXCEPT;
64-
6546
// CHECK: #if defined(__cplusplus)
6647
// CHECK-NEXT: }
6748
// CHECK-NEXT: #endif

test/attr/attr_cdecl_official.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,3 @@ class Foo {
5555

5656
@cdecl("throwing") // expected-error{{raising errors from @cdecl functions is not supported}}
5757
func throwing() throws { }
58-
59-
@cdecl("acceptedPointers")
60-
func acceptedPointers(_ x: UnsafeMutablePointer<Int>,
61-
y: UnsafePointer<Int>,
62-
z: UnsafeMutableRawPointer,
63-
w: UnsafeRawPointer,
64-
u: OpaquePointer) {}
65-
66-
@cdecl("rejectedPointers")
67-
func rejectedPointers( // expected-error 6 {{global function cannot be marked '@cdecl' because the type of the parameter}}
68-
x: UnsafePointer<String>, // expected-note {{Swift structs cannot be represented in Objective-C}} // FIXME: Should reference C.
69-
y: CVaListPointer, // expected-note {{Swift structs cannot be represented in Objective-C}}
70-
z: UnsafeBufferPointer<Int>, // expected-note {{Swift structs cannot be represented in Objective-C}}
71-
u: UnsafeMutableBufferPointer<Int>, // expected-note {{Swift structs cannot be represented in Objective-C}}
72-
v: UnsafeRawBufferPointer, // expected-note {{Swift structs cannot be represented in Objective-C}}
73-
t: UnsafeMutableRawBufferPointer) {} // expected-note {{Swift structs cannot be represented in Objective-C}}

0 commit comments

Comments
 (0)