summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/method-lookup-2.m
blob: 53cae83712526dca1d952fc6f74693feb5c02827 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// RUN: %clang_cc1 -fsyntax-only -verify %s
typedef signed char BOOL;

@protocol NSObject
+ alloc;
- init;
- (BOOL) isEqual:(id) object;
- (Class)class;
@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 {}
+(SenTestTool *) sharedInstance { return 0; }
-(int) run { return 0; }
+(int) run {
  return[[self sharedInstance] run];
}
@end

@interface XX : NSObject

+ classMethod;

@end

@interface YY : NSObject
- whatever;
@end

@implementation YY 

- whatever {
  id obj = [[XX alloc] init];
  [[obj class] classMethod];
  return 0;
}

@end