John McCall | 260611a | 2012-06-20 06:18:46 +0000 | [diff] [blame] | 1 | // 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 |
Fariborz Jahanian | ed76f44 | 2010-10-07 18:12:21 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp |
| 3 | // rdar:// 8520727 |
| 4 | |
| 5 | void *sel_registerName(const char *); |
| 6 | |
| 7 | @class NSString; |
| 8 | |
| 9 | @protocol CoreDAVAccountInfoProvider |
| 10 | - (NSString *)userAgentHeader; |
| 11 | @end |
| 12 | |
| 13 | @interface CoreDAVTask |
| 14 | { |
| 15 | id<CoreDAVAccountInfoProvider> _accountInfoProvider; |
| 16 | } |
| 17 | - (void)METHOD; |
| 18 | @end |
| 19 | |
| 20 | @implementation CoreDAVTask |
| 21 | - (void)METHOD { |
| 22 | if ([_accountInfoProvider userAgentHeader]) { |
| 23 | } |
| 24 | if (_accountInfoProvider.userAgentHeader) { |
| 25 | } |
| 26 | } |
| 27 | @end |
| 28 | |
Fariborz Jahanian | f2c6fa4 | 2010-10-14 23:31:39 +0000 | [diff] [blame] | 29 | //rdar: // 8541517 |
| 30 | @interface A { } |
| 31 | @property (retain) NSString *scheme; |
| 32 | @end |
| 33 | |
| 34 | @interface B : A { |
| 35 | NSString* _schemeName; |
| 36 | } |
| 37 | @end |
| 38 | |
| 39 | |
| 40 | @implementation B |
| 41 | -(void) test { |
| 42 | B *b; |
| 43 | b.scheme = _schemeName; // error because of this line |
| 44 | } |
| 45 | @end |
| 46 | |