Files
swift-mirror/test/Interop/ObjC/swiftify-import/Inputs/objc-no-swiftify.h
Henrik G. Olsson c335b80ebd [Swiftify] Don't create safe wrapper for autoreleasing pointers (#81568) (#81590)
_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
2025-05-20 08:03:10 -07:00

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);