9
9
// REQUIRES: objc_interop
10
10
11
11
// CHECK: /// What a nightmare!
12
- // CHECK-LABEL: double (^ _Nonnull block_nightmare(SWIFT_NOESCAPE float (^ _Nonnull x)(NSInteger)))(char);
12
+ // CHECK-LABEL: double (^ _Nonnull block_nightmare(SWIFT_NOESCAPE float (^ _Nonnull x)(NSInteger)))(char) SWIFT_WARN_UNUSED_RESULT ;
13
13
14
14
/// What a nightmare!
15
15
@_cdecl ( " block_nightmare " )
16
16
public func block_nightmare( x: @convention ( block) ( Int ) -> Float )
17
17
-> @convention ( block) ( CChar ) -> Double { return { _ in 0 } }
18
18
19
- // CHECK-LABEL: double (^ _Nonnull block_recurring_nightmare(float (^ _Nonnull x)(SWIFT_NOESCAPE NSInteger (^ _Nonnull)(double))))(SWIFT_NOESCAPE char (^ _Nonnull)(unsigned char));
19
+ // CHECK-LABEL: double (^ _Nonnull block_recurring_nightmare(float (^ _Nonnull x)(SWIFT_NOESCAPE NSInteger (^ _Nonnull)(double))))(SWIFT_NOESCAPE char (^ _Nonnull)(unsigned char)) SWIFT_WARN_UNUSED_RESULT ;
20
20
@_cdecl ( " block_recurring_nightmare " )
21
21
public func block_recurring_nightmare( x: @escaping @convention ( block) ( @convention ( block) ( Double ) -> Int ) -> Float )
22
22
-> @convention ( block) ( _ asdfasdf: @convention ( block) ( CUnsignedChar ) -> CChar ) -> Double {
@@ -27,12 +27,12 @@ public func block_recurring_nightmare(x: @escaping @convention(block) (@conventi
27
27
@_cdecl ( " foo_bar " )
28
28
func foo( x: Int , bar y: Int ) { }
29
29
30
- // CHECK-LABEL: double (* _Nonnull function_pointer_nightmare(SWIFT_NOESCAPE float (* _Nonnull x)(NSInteger)))(char);
30
+ // CHECK-LABEL: double (* _Nonnull function_pointer_nightmare(SWIFT_NOESCAPE float (* _Nonnull x)(NSInteger)))(char) SWIFT_WARN_UNUSED_RESULT ;
31
31
@_cdecl ( " function_pointer_nightmare " )
32
32
func function_pointer_nightmare( x: @convention ( c) ( Int ) -> Float )
33
33
-> @convention ( c) ( CChar ) -> Double { return { _ in 0 } }
34
34
35
- // CHECK-LABEL: double (* _Nonnull function_pointer_recurring_nightmare(float (* _Nonnull x)(SWIFT_NOESCAPE NSInteger (* _Nonnull)(double))))(SWIFT_NOESCAPE char (* _Nonnull)(unsigned char));
35
+ // CHECK-LABEL: double (* _Nonnull function_pointer_recurring_nightmare(float (* _Nonnull x)(SWIFT_NOESCAPE NSInteger (* _Nonnull)(double))))(SWIFT_NOESCAPE char (* _Nonnull)(unsigned char)) SWIFT_WARN_UNUSED_RESULT ;
36
36
@_cdecl ( " function_pointer_recurring_nightmare " )
37
37
public func function_pointer_recurring_nightmare( x: @escaping @convention ( c) ( @convention ( c) ( Double ) -> Int ) -> Float )
38
38
-> @convention ( c) ( @convention ( c) ( CUnsignedChar ) -> CChar ) -> Double {
@@ -42,3 +42,7 @@ public func function_pointer_recurring_nightmare(x: @escaping @convention(c) (@c
42
42
// CHECK-LABEL: void has_keyword_arg_names(NSInteger auto_, NSInteger union_);
43
43
@_cdecl ( " has_keyword_arg_names " )
44
44
func keywordArgNames( auto: Int , union: Int ) { }
45
+
46
+ // CHECK-LABEL: void return_never(void) SWIFT_NORETURN;
47
+ @_cdecl ( " return_never " )
48
+ func returnNever( ) -> Never { fatalError ( ) }
0 commit comments