1// RUN: %clang_cc1 -fsyntax-only -verify %s 2// expected-no-diagnostics 3typedef signed char BOOL; 4 5@protocol NSObject 6+ alloc; 7- init; 8- (BOOL) isEqual:(id) object; 9- (Class)class; 10@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 {} 39+(SenTestTool *) sharedInstance { return 0; } 40-(int) run { return 0; } 41+(int) run { 42 return[[self sharedInstance] run]; 43} 44@end 45 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]; 61 return 0; 62} 63 64@end 65