minix/external/bsd/llvm/dist/clang/test/Index/IBOutletCollection.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

20 lines
1.1 KiB
Objective-C

#define IBOutletCollection(ClassName) __attribute__((iboutletcollection(ClassName)))
@interface Test {
IBOutletCollection(Test) Test *anOutletCollection;
}
@end
// RUN: c-index-test -cursor-at=%s:4:24 %s | FileCheck -check-prefix=CHECK-CURSOR %s
// CHECK-CURSOR: ObjCClassRef=Test:3:12
// RUN: c-index-test -test-annotate-tokens=%s:4:1:5:1 %s | FileCheck -check-prefix=CHECK-TOK %s
// CHECK-TOK: Identifier: "IBOutletCollection" [4:3 - 4:21] macro expansion=IBOutletCollection:1:9
// FIXME: The following token should belong to the macro expansion cursor.
// CHECK-TOK: Punctuation: "(" [4:21 - 4:22] attribute(iboutletcollection)= [IBOutletCollection=ObjCInterface]
// CHECK-TOK: Identifier: "Test" [4:22 - 4:26] ObjCClassRef=Test:3:12
// FIXME: The following token should belong to the macro expansion cursor.
// CHECK-TOK: Punctuation: ")" [4:26 - 4:27]
// CHECK-TOK: Identifier: "Test" [4:28 - 4:32] ObjCClassRef=Test:3:12
// CHECK-TOK: Punctuation: "*" [4:33 - 4:34] ObjCIvarDecl=anOutletCollection:4:34 (Definition)
// CHECK-TOK: Identifier: "anOutletCollection" [4:34 - 4:52] ObjCIvarDecl=anOutletCollection:4:34 (Definition)