Files
swift-mirror/test/Inputs/clang-importer-sdk/usr/include/blocks.h
Saleem Abdulrasool bdb7901a1c test: modernise nullability attributes (NFC)
Use the modern spelling for the nullability attributes in the test mock
headers.  Currently, this was relying on the predefined macros from
clang to work.  However, those are only available on Darwin targets.
This is needed to make the mock environments more portable.
2017-11-01 23:27:33 -07:00

25 lines
727 B
Objective-C

@import Foundation;
@import Dispatch;
@interface NSString ()
- (void)enumerateLinesUsingBlock:
(nonnull __attribute__((noescape)) void (^)(_Nonnull NSString *line))f;
// FIXME: The importer drops this.
//- (void)enumerateLinesUsingBlock:(void (^)(NSString *line, BOOL *b)) f;
@end
typedef void (^my_block_t)(void);
my_block_t blockWithoutNullability();
my_block_t _Nonnull blockWithNonnull();
my_block_t _Null_unspecified blockWithNullUnspecified();
my_block_t _Nullable blockWithNullable();
void accepts_block(my_block_t) __attribute__((nonnull));
void accepts_noescape_block(__attribute__((noescape)) my_block_t) __attribute__((nonnull));
// Please see related tests in PrintAsObjC/imported-block-typedefs.swift.