1// RUN: rm -rf %t
2// 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
3// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
4// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
5// rdar://15300059
6
7
8#define __NSi_7_0 introduced=7.0
9#define __NSi_6_0 introduced=6.0
10
11#define CF_AVAILABLE(_mac, _ios) __attribute__((availability(ios,__NSi_##_ios)))
12#define CF_AVAILABLE_MAC(_mac) __attribute__((availability(macosx,__NSi_##_mac)))
13#define CF_AVAILABLE_IOS(_ios) __attribute__((availability(macosx,unavailable)))
14
15#define NS_AVAILABLE(_mac, _ios) CF_AVAILABLE(_mac, _ios)
16#define NS_AVAILABLE_MAC(_mac) CF_AVAILABLE_MAC(_mac)
17#define NS_AVAILABLE_IOS(_ios) CF_AVAILABLE_IOS(_ios)
18
19#define UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
20
21@interface MKMapItem
22@property (nonatomic, strong) MKMapItem *source NS_AVAILABLE(10_9, 6_0);
23- (void)setSource:(MKMapItem *)source NS_AVAILABLE(10_9, 7_0);
24
25@property (nonatomic, strong) MKMapItem *dest NS_AVAILABLE(10_9, 6_0);
26
27@property (nonatomic, strong) MKMapItem *final;
28
29@property (nonatomic, strong) MKMapItem *total NS_AVAILABLE(10_9, 6_0);
30- (void)setTotal:(MKMapItem *)source;
31
32- (MKMapItem *)comp NS_AVAILABLE(10_9, 6_0);
33- (void)setComp:(MKMapItem *)source UNAVAILABLE;
34
35@property (nonatomic, strong) MKMapItem *tally  UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
36
37- (MKMapItem *)itally  NS_AVAILABLE(10_9, 6_0);
38- (void)setItally:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
39
40- (MKMapItem *)normal  UNAVAILABLE;
41- (void)setNormal:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
42@end
43
44