2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2008-06-05 22:49:39 +08:00
|
|
|
typedef signed char BOOL;
|
|
|
|
|
|
|
|
@protocol NSObject
|
2009-02-27 02:16:19 +08:00
|
|
|
+ alloc;
|
|
|
|
- init;
|
2008-06-05 22:49:39 +08:00
|
|
|
- (BOOL) isEqual:(id) object;
|
2009-02-27 02:16:19 +08:00
|
|
|
- (Class)class;
|
2008-06-05 22:49:39 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSObject < NSObject > {} @end
|
|
|
|
|
|
|
|
@class NSString, NSPort;
|
|
|
|
|
|
|
|
@interface NSPortNameServer:NSObject
|
|
|
|
+ (NSPortNameServer *) systemDefaultPortNameServer;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSMachBootstrapServer:NSPortNameServer + (id) sharedInstance; @end
|
|
|
|
|
|
|
|
enum {
|
|
|
|
NSWindowsNTOperatingSystem = 1, NSWindows95OperatingSystem, NSSolarisOperatingSystem, NSHPUXOperatingSystem, NSMACHOperatingSystem, NSSunOSOperatingSystem, NSOSF1OperatingSystem
|
|
|
|
};
|
|
|
|
|
|
|
|
@interface NSRunLoop:NSObject {} @end
|
|
|
|
|
|
|
|
@interface NSRunLoop(NSRunLoopConveniences)
|
|
|
|
- (void) run;
|
|
|
|
@end
|
|
|
|
|
|
|
|
extern NSString *const NSWillBecomeMultiThreadedNotification;
|
|
|
|
|
|
|
|
@interface SenTestTool:NSObject {}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SenTestTool
|
|
|
|
+ (void) initialize {}
|
2009-07-22 08:43:08 +08:00
|
|
|
+(SenTestTool *) sharedInstance { return 0; }
|
|
|
|
-(int) run { return 0; }
|
2008-06-05 22:49:39 +08:00
|
|
|
+(int) run {
|
|
|
|
return[[self sharedInstance] run];
|
|
|
|
}
|
|
|
|
@end
|
2009-02-27 02:16:19 +08:00
|
|
|
|
|
|
|
@interface XX : NSObject
|
|
|
|
|
|
|
|
+ classMethod;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface YY : NSObject
|
|
|
|
- whatever;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation YY
|
|
|
|
|
|
|
|
- whatever {
|
|
|
|
id obj = [[XX alloc] init];
|
|
|
|
[[obj class] classMethod];
|
2009-07-22 08:43:08 +08:00
|
|
|
return 0;
|
2009-02-27 02:16:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|