]> granicus.if.org Git - clang/commitdiff
[libclang] Add a test I forgot to commit for r156890.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 25 May 2012 20:05:57 +0000 (20:05 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 25 May 2012 20:05:57 +0000 (20:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157491 91177308-0d34-0410-b5e6-96231b3b80d8

test/Index/index-refs.m [new file with mode: 0644]

diff --git a/test/Index/index-refs.m b/test/Index/index-refs.m
new file mode 100644 (file)
index 0000000..b82345f
--- /dev/null
@@ -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