blob: a1ae271bbead418316f1acbc5de729537368e6bc [file] [log] [blame]
Steve Naroffc4df6d22009-11-07 02:08:14 +00001// Note: the run lines follow their respective tests, since line/column
2// matter in this test.
3
4@protocol FooTestProtocol
5+ protocolClassMethod;
6- protocolInstanceMethod;
7@end
8@interface Foo <FooTestProtocol> {
9 void *isa;
10}
11+ (int)classMethod1:a withKeyword:b;
12+ (void)classMethod2;
13+ new;
14- instanceMethod1;
15@end
16
17@interface Foo (FooTestCategory)
18+ categoryClassMethod;
19- categoryInstanceMethod;
20@end
21
22void func() {
23 Foo *obj = [Foo new];
24 [obj xx];
25}
Daniel Dunbara5728872009-12-15 20:14:24 +000026// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:19 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
Steve Naroffc4df6d22009-11-07 02:08:14 +000027// CHECK-CC1: categoryClassMethod : 0
Douglas Gregor36ecb042009-11-17 23:22:23 +000028// CHECK-CC1: classMethod1:withKeyword: : 0
Steve Naroffc4df6d22009-11-07 02:08:14 +000029// CHECK-CC1: classMethod2 : 0
30// CHECK-CC1: new : 0
31// CHECK-CC1: protocolClassMethod : 0
Daniel Dunbara5728872009-12-15 20:14:24 +000032// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:24:8 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
Steve Naroffc4df6d22009-11-07 02:08:14 +000033// CHECK-CC2: categoryInstanceMethod : 0
34// CHECK-CC2: instanceMethod1 : 0
35// CHECK-CC2: protocolInstanceMethod : 0