1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 3*f4a2713aSLionel Sambuc// rdar:// 8520727 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambucvoid *sel_registerName(const char *); 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@class NSString; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@protocol CoreDAVAccountInfoProvider 10*f4a2713aSLionel Sambuc- (NSString *)userAgentHeader; 11*f4a2713aSLionel Sambuc@end 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@interface CoreDAVTask 14*f4a2713aSLionel Sambuc{ 15*f4a2713aSLionel Sambuc id<CoreDAVAccountInfoProvider> _accountInfoProvider; 16*f4a2713aSLionel Sambuc} 17*f4a2713aSLionel Sambuc- (void)METHOD; 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@implementation CoreDAVTask 21*f4a2713aSLionel Sambuc- (void)METHOD { 22*f4a2713aSLionel Sambuc if ([_accountInfoProvider userAgentHeader]) { 23*f4a2713aSLionel Sambuc } 24*f4a2713aSLionel Sambuc if (_accountInfoProvider.userAgentHeader) { 25*f4a2713aSLionel Sambuc } 26*f4a2713aSLionel Sambuc} 27*f4a2713aSLionel Sambuc@end 28*f4a2713aSLionel Sambuc 29*f4a2713aSLionel Sambuc//rdar: // 8541517 30*f4a2713aSLionel Sambuc@interface A { } 31*f4a2713aSLionel Sambuc@property (retain) NSString *scheme; 32*f4a2713aSLionel Sambuc@end 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambuc@interface B : A { 35*f4a2713aSLionel Sambuc NSString* _schemeName; 36*f4a2713aSLionel Sambuc} 37*f4a2713aSLionel Sambuc@end 38*f4a2713aSLionel Sambuc 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambuc@implementation B 41*f4a2713aSLionel Sambuc-(void) test { 42*f4a2713aSLionel Sambuc B *b; 43*f4a2713aSLionel Sambuc b.scheme = _schemeName; // error because of this line 44*f4a2713aSLionel Sambuc} 45*f4a2713aSLionel Sambuc@end 46*f4a2713aSLionel Sambuc 47