2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fobjc-arc -verify -Wno-objc-root-class %s
|
2011-06-16 07:02:42 +08:00
|
|
|
|
|
|
|
// rdar://problem/9150784
|
|
|
|
void test(void) {
|
|
|
|
__weak id x; // expected-error {{the current deployment target does not support automated __weak references}}
|
2012-07-20 02:10:18 +08:00
|
|
|
__weak void *v; // expected-warning {{'__weak' only applies to Objective-C object or block pointer types}}
|
2011-06-16 07:02:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@interface A
|
|
|
|
@property (weak) id testObjectWeakProperty; // expected-note {{declared here}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation A
|
|
|
|
// rdar://9605088
|
|
|
|
@synthesize testObjectWeakProperty; // expected-error {{the current deployment target does not support automated __weak references}}
|
|
|
|
@end
|