blob: 1b5d62c7ae5a3ae5df96d37bfc0e7eea1d36f73b [file] [log] [blame]
Argyrios Kyrtzidis221d5a52011-09-13 18:49:56 +00001#define IBOutletCollection(ClassName) __attribute__((iboutletcollection(ClassName)))
2
3@interface Test {
4 IBOutletCollection(Test) Test *anOutletCollection;
5}
6@end
7
8// RUN: c-index-test -cursor-at=%s:4:24 %s | FileCheck -check-prefix=CHECK-CURSOR %s
9// CHECK-CURSOR: ObjCClassRef=Test:3:12
10
11// RUN: c-index-test -test-annotate-tokens=%s:4:1:5:1 %s | FileCheck -check-prefix=CHECK-TOK %s
12// CHECK-TOK: Identifier: "IBOutletCollection" [4:3 - 4:21] macro expansion=IBOutletCollection:1:9
Argyrios Kyrtzidisa86b37e2013-02-08 01:12:25 +000013// FIXME: The following token should belong to the macro expansion cursor.
Argyrios Kyrtzidise9de4852013-01-07 19:16:27 +000014// CHECK-TOK: Punctuation: "(" [4:21 - 4:22] attribute(iboutletcollection)= [IBOutletCollection=ObjCInterface]
Argyrios Kyrtzidis221d5a52011-09-13 18:49:56 +000015// CHECK-TOK: Identifier: "Test" [4:22 - 4:26] ObjCClassRef=Test:3:12
Argyrios Kyrtzidisa86b37e2013-02-08 01:12:25 +000016// FIXME: The following token should belong to the macro expansion cursor.
17// CHECK-TOK: Punctuation: ")" [4:26 - 4:27]
Argyrios Kyrtzidis221d5a52011-09-13 18:49:56 +000018// CHECK-TOK: Identifier: "Test" [4:28 - 4:32] ObjCClassRef=Test:3:12
19// CHECK-TOK: Punctuation: "*" [4:33 - 4:34] ObjCIvarDecl=anOutletCollection:4:34 (Definition)
20// CHECK-TOK: Identifier: "anOutletCollection" [4:34 - 4:52] ObjCIvarDecl=anOutletCollection:4:34 (Definition)