mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
_SwiftifyImport doesn't know how to handle AutoreleasingUnsafeMutablePointer, so we should not attach any .countedBy information for pointers that are imported as this type. This also adds defensive checks against adding .countedBy to any pointer type that _SwiftifyImport doesn't know how to transform. rdar://151479521
10 lines
306 B
Objective-C
10 lines
306 B
Objective-C
#define __counted_by(x) __attribute__((__counted_by__(x)))
|
|
|
|
@interface SomeClass
|
|
- (int)numberOfSegments;
|
|
@end
|
|
|
|
void autoreleaseParam(SomeClass * __autoreleasing * __counted_by(len) p, int len); // expected-note{{declared here}}
|
|
|
|
SomeClass * __autoreleasing * __counted_by(len) autoreleaseReturn(int len);
|