1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fobjc-arc -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc// rdar://problem/9150784 4*f4a2713aSLionel Sambucvoid test(void) { 5*f4a2713aSLionel Sambuc __weak id x; // expected-error {{the current deployment target does not support automated __weak references}} 6*f4a2713aSLionel Sambuc __weak void *v; // expected-warning {{'__weak' only applies to Objective-C object or block pointer types}} 7*f4a2713aSLionel Sambuc} 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@interface A 10*f4a2713aSLionel Sambuc@property (weak) id testObjectWeakProperty; // expected-note {{declared here}} 11*f4a2713aSLionel Sambuc@end 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@implementation A 14*f4a2713aSLionel Sambuc// rdar://9605088 15*f4a2713aSLionel Sambuc@synthesize testObjectWeakProperty; // expected-error {{the current deployment target does not support automated __weak references}} 16*f4a2713aSLionel Sambuc@end 17