xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/method-lookup-2.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc// expected-no-diagnostics
3*f4a2713aSLionel Sambuctypedef signed char BOOL;
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc@protocol NSObject
6*f4a2713aSLionel Sambuc+ alloc;
7*f4a2713aSLionel Sambuc- init;
8*f4a2713aSLionel Sambuc- (BOOL) isEqual:(id) object;
9*f4a2713aSLionel Sambuc- (Class)class;
10*f4a2713aSLionel Sambuc@end
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuc@interface NSObject < NSObject > {} @end
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc@class NSString, NSPort;
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc@interface NSPortNameServer:NSObject
17*f4a2713aSLionel Sambuc+ (NSPortNameServer *) systemDefaultPortNameServer;
18*f4a2713aSLionel Sambuc@end
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambuc@interface NSMachBootstrapServer:NSPortNameServer + (id) sharedInstance; @end
21*f4a2713aSLionel Sambuc
22*f4a2713aSLionel Sambucenum {
23*f4a2713aSLionel Sambuc  NSWindowsNTOperatingSystem = 1, NSWindows95OperatingSystem, NSSolarisOperatingSystem, NSHPUXOperatingSystem, NSMACHOperatingSystem, NSSunOSOperatingSystem, NSOSF1OperatingSystem
24*f4a2713aSLionel Sambuc};
25*f4a2713aSLionel Sambuc
26*f4a2713aSLionel Sambuc@interface NSRunLoop:NSObject {} @end
27*f4a2713aSLionel Sambuc
28*f4a2713aSLionel Sambuc@interface NSRunLoop(NSRunLoopConveniences)
29*f4a2713aSLionel Sambuc- (void) run;
30*f4a2713aSLionel Sambuc@end
31*f4a2713aSLionel Sambuc
32*f4a2713aSLionel Sambucextern NSString *const NSWillBecomeMultiThreadedNotification;
33*f4a2713aSLionel Sambuc
34*f4a2713aSLionel Sambuc@interface SenTestTool:NSObject {}
35*f4a2713aSLionel Sambuc@end
36*f4a2713aSLionel Sambuc
37*f4a2713aSLionel Sambuc@implementation SenTestTool
38*f4a2713aSLionel Sambuc+ (void) initialize {}
39*f4a2713aSLionel Sambuc+(SenTestTool *) sharedInstance { return 0; }
40*f4a2713aSLionel Sambuc-(int) run { return 0; }
41*f4a2713aSLionel Sambuc+(int) run {
42*f4a2713aSLionel Sambuc  return[[self sharedInstance] run];
43*f4a2713aSLionel Sambuc}
44*f4a2713aSLionel Sambuc@end
45*f4a2713aSLionel Sambuc
46*f4a2713aSLionel Sambuc@interface XX : NSObject
47*f4a2713aSLionel Sambuc
48*f4a2713aSLionel Sambuc+ classMethod;
49*f4a2713aSLionel Sambuc
50*f4a2713aSLionel Sambuc@end
51*f4a2713aSLionel Sambuc
52*f4a2713aSLionel Sambuc@interface YY : NSObject
53*f4a2713aSLionel Sambuc- whatever;
54*f4a2713aSLionel Sambuc@end
55*f4a2713aSLionel Sambuc
56*f4a2713aSLionel Sambuc@implementation YY
57*f4a2713aSLionel Sambuc
58*f4a2713aSLionel Sambuc- whatever {
59*f4a2713aSLionel Sambuc  id obj = [[XX alloc] init];
60*f4a2713aSLionel Sambuc  [[obj class] classMethod];
61*f4a2713aSLionel Sambuc  return 0;
62*f4a2713aSLionel Sambuc}
63*f4a2713aSLionel Sambuc
64*f4a2713aSLionel Sambuc@end
65