aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-25 20:05:57 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-25 20:05:57 +0000
commit6e5fa8c74ac4ed70475fcc0e48b897e2dbe9c8d4 (patch)
tree007af880965c2508b11370cbea6027be2dbc21f9
parent41be8cd0593f2e08e41eed218e1b91f419e829a1 (diff)
[libclang] Add a test I forgot to commit for r156890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157491 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Index/index-refs.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Index/index-refs.m b/test/Index/index-refs.m
new file mode 100644
index 0000000000..b82345f9c6
--- /dev/null
+++ b/test/Index/index-refs.m
@@ -0,0 +1,18 @@
+
+@class Protocol;
+
+@protocol Prot
+@end
+
+struct FooS {
+ int x;
+};
+
+void foo() {
+ Protocol *p = @protocol(Prot);
+ @encode(struct FooS);
+}
+
+// RUN: c-index-test -index-file %s | FileCheck %s
+// CHECK: [indexEntityReference]: kind: objc-protocol | name: Prot | {{.*}} | loc: 12:27
+// CHECK: [indexEntityReference]: kind: struct | name: FooS | {{.*}} | loc: 13:18