Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Steve Naroff | e2af8b1 | 2008-06-05 14:49:39 +0000 | [diff] [blame] | 3 | typedef signed char BOOL; |
| 4 | |
| 5 | @protocol NSObject |
Steve Naroff | 1f484f4 | 2009-02-26 18:16:19 +0000 | [diff] [blame] | 6 | + alloc; |
| 7 | - init; |
Steve Naroff | e2af8b1 | 2008-06-05 14:49:39 +0000 | [diff] [blame] | 8 | - (BOOL) isEqual:(id) object; |
Steve Naroff | 1f484f4 | 2009-02-26 18:16:19 +0000 | [diff] [blame] | 9 | - (Class)class; |
Steve Naroff | e2af8b1 | 2008-06-05 14:49:39 +0000 | [diff] [blame] | 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 | |
| 22 | enum { |
| 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 | |
| 32 | extern NSString *const NSWillBecomeMultiThreadedNotification; |
| 33 | |
| 34 | @interface SenTestTool:NSObject {} |
| 35 | @end |
| 36 | |
| 37 | @implementation SenTestTool |
| 38 | + (void) initialize {} |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 39 | +(SenTestTool *) sharedInstance { return 0; } |
| 40 | -(int) run { return 0; } |
Steve Naroff | e2af8b1 | 2008-06-05 14:49:39 +0000 | [diff] [blame] | 41 | +(int) run { |
| 42 | return[[self sharedInstance] run]; |
| 43 | } |
| 44 | @end |
Steve Naroff | 1f484f4 | 2009-02-26 18:16:19 +0000 | [diff] [blame] | 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]; |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 61 | return 0; |
Steve Naroff | 1f484f4 | 2009-02-26 18:16:19 +0000 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | @end |