blob: c3e4405ebb58b02454016abbcca458f42f73d9de [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// 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 Jahanianed76f442010-10-07 18:12:21 +00002// 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
5void *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 Jahanianf2c6fa42010-10-14 23:31:39 +000029//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