1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result 2 // RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t 3 // RUN: diff %t %s.result 4 5 #include "Common.h" 6 7 @interface NSData : NSObject 8 - (const void *)bytes; 9 @end 10 11 typedef struct _NSRange { 12 NSUInteger location; 13 NSUInteger length; 14 } NSRange; 15 16 @interface NSData (NSExtendedData) 17 - (void)getBytes:(void *)buffer length:(NSUInteger)length; 18 - (void)getBytes:(void *)buffer range:(NSRange)range; 19 @end 20 21 @interface NSData (NSDeprecated) 22 - (void)getBytes:(void *)buffer; 23 @end 24 25 void test(NSData* parmdata) { 26 NSData *data, *data2 = parmdata; 27 void *p = [data bytes]; 28 p = [data bytes]; 29 30 [data2 getBytes:&p length:sizeof(p)]; 31 p = [parmdata bytes]; 32 } 33