summaryrefslogtreecommitdiff
path: root/clang/test/Index/IBOutletCollection.m
diff options
context:
space:
mode:
authorZancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au>2012-09-24 09:58:17 +1000
committerZancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au>2012-09-24 09:58:17 +1000
commit222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch)
tree7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/Index/IBOutletCollection.m
parent3d206f03985b50beacae843d880bccdc91a9f424 (diff)
Add the clang library to the repo (with some of my changes, too).
Diffstat (limited to 'clang/test/Index/IBOutletCollection.m')
-rw-r--r--clang/test/Index/IBOutletCollection.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Index/IBOutletCollection.m b/clang/test/Index/IBOutletCollection.m
new file mode 100644
index 0000000..a95df86
--- /dev/null
+++ b/clang/test/Index/IBOutletCollection.m
@@ -0,0 +1,18 @@
+#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
+// CHECK-TOK: Punctuation: "(" [4:21 - 4:22] ObjCInterfaceDecl=Test:3:12
+// CHECK-TOK: Identifier: "Test" [4:22 - 4:26] ObjCClassRef=Test:3:12
+// CHECK-TOK: Punctuation: ")" [4:26 - 4:27] ObjCIvarDecl=anOutletCollection:4:34 (Definition)
+// 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)