diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-01 00:26:48 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-01 00:26:48 +0000 |
| commit | 071b98edec5606d4eee2eba6f1d9a52051a7d8ed (patch) | |
| tree | 2b9550511624ba39683beec0fba8e9e6de523365 /clang/test/ARCMT/objcmt-property-availability.m.result | |
| parent | 493cd8c09b2c3b10c2bd4026fa1cc760d1dd0e3b (diff) | |
| download | bcm5719-llvm-071b98edec5606d4eee2eba6f1d9a52051a7d8ed.tar.gz bcm5719-llvm-071b98edec5606d4eee2eba6f1d9a52051a7d8ed.zip | |
ObjectiveC migrator. When inferring readwrite property,
do not remove the setter if its availability differs
from availability of the getter (which is now turned into
a property). Otherwise, synthesized setter will
inherit availability of the property (which is incorrect).
// rdar://15300059
llvm-svn: 193837
Diffstat (limited to 'clang/test/ARCMT/objcmt-property-availability.m.result')
| -rw-r--r-- | clang/test/ARCMT/objcmt-property-availability.m.result | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/clang/test/ARCMT/objcmt-property-availability.m.result b/clang/test/ARCMT/objcmt-property-availability.m.result new file mode 100644 index 00000000000..681f9a99bf5 --- /dev/null +++ b/clang/test/ARCMT/objcmt-property-availability.m.result @@ -0,0 +1,43 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-readonly-property -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -triple x86_64-apple-darwin11 +// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result +// rdar://15300059 + + +#define __NSi_7_0 introduced=7.0 +#define __NSi_6_0 introduced=6.0 + +#define CF_AVAILABLE(_mac, _ios) __attribute__((availability(ios,__NSi_##_ios))) +#define CF_AVAILABLE_MAC(_mac) __attribute__((availability(macosx,__NSi_##_mac))) +#define CF_AVAILABLE_IOS(_ios) __attribute__((availability(macosx,unavailable))) + +#define NS_AVAILABLE(_mac, _ios) CF_AVAILABLE(_mac, _ios) +#define NS_AVAILABLE_MAC(_mac) CF_AVAILABLE_MAC(_mac) +#define NS_AVAILABLE_IOS(_ios) CF_AVAILABLE_IOS(_ios) + +#define UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode"))) + +@interface MKMapItem +@property (nonatomic, retain) MKMapItem *source NS_AVAILABLE(10_9, 6_0); +- (void)setSource:(MKMapItem *)source NS_AVAILABLE(10_9, 7_0); + +@property (nonatomic, retain) MKMapItem *dest NS_AVAILABLE(10_9, 6_0); + +@property (nonatomic, retain) MKMapItem *final; + +@property (nonatomic, retain) MKMapItem *total NS_AVAILABLE(10_9, 6_0); +- (void)setTotal:(MKMapItem *)source; + +- (MKMapItem *)comp NS_AVAILABLE(10_9, 6_0); +- (void)setComp:(MKMapItem *)source UNAVAILABLE; + +@property (nonatomic, retain) MKMapItem *tally UNAVAILABLE NS_AVAILABLE(10_9, 6_0); + +- (MKMapItem *)itally NS_AVAILABLE(10_9, 6_0); +- (void)setItally:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0); + +- (MKMapItem *)normal UNAVAILABLE; +- (void)setNormal:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0); +@end + |

