blob: 25963048f749283763359cd77fa341607149d4d5 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Steve Naroffe2af8b12008-06-05 14:49:39 +00003typedef signed char BOOL;
4
5@protocol NSObject
Steve Naroff1f484f42009-02-26 18:16:19 +00006+ alloc;
7- init;
Steve Naroffe2af8b12008-06-05 14:49:39 +00008- (BOOL) isEqual:(id) object;
Steve Naroff1f484f42009-02-26 18:16:19 +00009- (Class)class;
Steve Naroffe2af8b12008-06-05 14:49:39 +000010@end
11
12@interface NSObject < NSObject > {} @end
13
14@class NSString, NSPort;
15
16@interface NSPortNameServer:NSObject
17+ (NSPortNameServer *) systemDefaultPortNameServer;
18@end
19
20@interface NSMachBootstrapServer:NSPortNameServer + (id) sharedInstance; @end
21
22enum {
23 NSWindowsNTOperatingSystem = 1, NSWindows95OperatingSystem, NSSolarisOperatingSystem, NSHPUXOperatingSystem, NSMACHOperatingSystem, NSSunOSOperatingSystem, NSOSF1OperatingSystem
24};
25
26@interface NSRunLoop:NSObject {} @end
27
28@interface NSRunLoop(NSRunLoopConveniences)
29- (void) run;
30@end
31
32extern NSString *const NSWillBecomeMultiThreadedNotification;
33
34@interface SenTestTool:NSObject {}
35@end
36
37@implementation SenTestTool
38+ (void) initialize {}
Mike Stumpd1969d82009-07-22 00:43:08 +000039+(SenTestTool *) sharedInstance { return 0; }
40-(int) run { return 0; }
Steve Naroffe2af8b12008-06-05 14:49:39 +000041+(int) run {
42 return[[self sharedInstance] run];
43}
44@end
Steve Naroff1f484f42009-02-26 18:16:19 +000045
46@interface XX : NSObject
47
48+ classMethod;
49
50@end
51
52@interface YY : NSObject
53- whatever;
54@end
55
56@implementation YY
57
58- whatever {
59 id obj = [[XX alloc] init];
60 [[obj class] classMethod];
Mike Stumpd1969d82009-07-22 00:43:08 +000061 return 0;
Steve Naroff1f484f42009-02-26 18:16:19 +000062}
63
64@end