blob: 0b6c3d16decc79b72aca3433dd7160fed3a58ce6 [file] [log] [blame]
Argyrios Kyrtzidis47b15172013-07-19 18:57:15 +00001// RUN: %clang_cc1 -arcmt-check -fobjc-arc -fobjc-default-synthesize-properties -fobjc-runtime=macosx-10.8.0 -triple x86_64-apple-darwin12 -fblocks -Werror %s
2// DISABLE: mingw32
3
4#if __has_feature(objc_arc)
5#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
6#else
7#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE
8#endif
9
10typedef const void * CFTypeRef;
11CFTypeRef CFBridgingRetain(id X);
12id CFBridgingRelease(CFTypeRef);
13
14typedef int BOOL;
15typedef unsigned NSUInteger;
16
17@protocol NSObject
18- (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
19- (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
20- (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
21- (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
22@end
23
24@interface NSObject <NSObject> {}
25- (id)init;
26
27+ (id)new;
28+ (id)alloc;
29- (void)dealloc;
30
31- (void)finalize;
32
33- (id)copy;
34- (id)mutableCopy;
35@end
36
37typedef const struct __CFString * CFStringRef;
38extern const CFStringRef kUTTypePlainText;
39extern const CFStringRef kUTTypeRTF;
40@class NSString;
41
42@interface Test : NSObject
43@property (weak) NSString *weakProperty;
44@end
45
46@implementation Test
47@end
Argyrios Kyrtzidisec852d92013-07-22 18:13:54 +000048
49#if ! __has_feature(objc_arc)
50#error This file must be compiled with ARC (set -fobjc_arc flag on file)
51#endif