Files
swift-mirror/test/Inputs/clang-importer-sdk/usr/include/nullability.h
Doug Gregor 5524c0a393 Honor the Clang nonnull and returns_nonnull attributes in the importer.
Non-null attributes can indicate non-optionality of pointers. While
these non-null attributes are generally less useful than the
nullability type specifiers, they are occasionally used in the
wild. Addresses rdar://problem/18428099.

Swift SVN r23733
2014-12-05 06:58:54 +00:00

23 lines
678 B
Objective-C

#ifndef NULLABILITY_H
#define NULLABILITY_H
typedef __nonnull id nonnull_id;
__nullable id getId1(void);
__nullable nonnull_id getId2(void);
extern __nullable id global_id;
@interface SomeClass
- (nonnull id)methodA:(nullable SomeClass *)obj;
- (nonnull nonnull_id)methodB:(nullable int (^)(int, int))block;
- (nullable nonnull_id)methodC;
@property (nullable) nonnull_id property;
- (id)methodD __attribute__((returns_nonnull));
- (void)methodE:(SomeClass *) __attribute__((nonnull)) obj;
- (void)methodF:(SomeClass *)obj second:(SomeClass *)obj2 __attribute__((nonnull));
- (void)methodG:(SomeClass *)obj second:(SomeClass *)obj2 __attribute__((nonnull(1)));
@end
#endif