1 // RUN: %clang_cc1 -arcmt-action=check -fobjc-arc -fobjc-runtime=macosx-10.8.0 -triple x86_64-apple-darwin12 -fblocks -Werror %s
3 #if __has_feature(objc_arc)
4 #define NS_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
6 #define NS_AUTOMATED_REFCOUNT_UNAVAILABLE
9 typedef const void * CFTypeRef;
10 CFTypeRef CFBridgingRetain(id X);
11 id CFBridgingRelease(CFTypeRef);
14 typedef unsigned NSUInteger;
17 - (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
18 - (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
19 - (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
20 - (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
23 @interface NSObject <NSObject> {}
36 typedef const struct __CFString * CFStringRef;
37 extern const CFStringRef kUTTypePlainText;
38 extern const CFStringRef kUTTypeRTF;
41 @interface Test : NSObject
42 @property (weak) NSString *weakProperty;
48 #if ! __has_feature(objc_arc)
49 #error This file must be compiled with ARC (set -fobjc_arc flag on file)