annotate clang/test/Index/annotate-parameterized-classes.m @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 @protocol NSObject
anatofuz
parents:
diff changeset
2 @end
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @interface NSObject
anatofuz
parents:
diff changeset
5 @end
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 @interface A<T : id, U : NSObject *> : NSObject
anatofuz
parents:
diff changeset
8 @end
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 @interface A<T : id, U : NSObject *> (Cat1)
anatofuz
parents:
diff changeset
11 @end
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 typedef A<id<NSObject>, NSObject *> ASpecialization1;
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 @interface B<T : id, U : NSObject *> : A<T, U>
anatofuz
parents:
diff changeset
16 @end
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 // RUN: c-index-test -test-annotate-tokens=%s:7:1:9:1 %s -target x86_64-apple-macosx10.7.0 | FileCheck -check-prefix=CHECK-INTERFACE-DECL %s
anatofuz
parents:
diff changeset
19 // CHECK-INTERFACE-DECL: Identifier: "T" [7:14 - 7:15] TemplateTypeParameter=T:7:14
anatofuz
parents:
diff changeset
20 // CHECK-INTERFACE-DECL: Identifier: "id" [7:18 - 7:20] TypeRef=id:0:0
anatofuz
parents:
diff changeset
21 // CHECK-INTERFACE-DECL: Identifier: "U" [7:22 - 7:23] TemplateTypeParameter=U:7:22
anatofuz
parents:
diff changeset
22 // CHECK-INTERFACE-DECL: Identifier: "NSObject" [7:26 - 7:34] ObjCClassRef=NSObject:4:12
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 // RUN: c-index-test -test-annotate-tokens=%s:10:1:12:1 %s -target x86_64-apple-macosx10.7.0 | FileCheck -check-prefix=CHECK-CATEGORY-DECL %s
anatofuz
parents:
diff changeset
25 // CHECK-CATEGORY-DECL: Identifier: "T" [10:14 - 10:15] TemplateTypeParameter=T:10:14
anatofuz
parents:
diff changeset
26 // CHECK-CATEGORY-DECL: Identifier: "id" [10:18 - 10:20] TypeRef=id:0:0
anatofuz
parents:
diff changeset
27 // CHECK-CATEGORY-DECL: Identifier: "U" [10:22 - 10:23] TemplateTypeParameter=U:10:22
anatofuz
parents:
diff changeset
28 // CHECK-CATEGORY-DECL: Identifier: "NSObject" [10:26 - 10:34] ObjCClassRef=NSObject:4:12
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 // RUN: c-index-test -test-annotate-tokens=%s:13:1:14:1 %s -target x86_64-apple-macosx10.7.0 | FileCheck -check-prefix=CHECK-SPECIALIZATION %s
anatofuz
parents:
diff changeset
31 // CHECK-SPECIALIZATION: Identifier: "id" [13:11 - 13:13] TypeRef=id:0:0
anatofuz
parents:
diff changeset
32 // CHECK-SPECIALIZATION: Identifier: "NSObject" [13:14 - 13:22] ObjCProtocolRef=NSObject:1:11
anatofuz
parents:
diff changeset
33 // CHECK-SPECIALIZATION: Identifier: "NSObject" [13:25 - 13:33] ObjCClassRef=NSObject:4:12
anatofuz
parents:
diff changeset
34
anatofuz
parents:
diff changeset
35 // RUN: c-index-test -test-annotate-tokens=%s:15:1:16:1 %s -target x86_64-apple-macosx10.7.0 | FileCheck -check-prefix=CHECK-SUPER %s
anatofuz
parents:
diff changeset
36 // CHECK-SUPER: Identifier: "A" [15:40 - 15:41] ObjCSuperClassRef=A:7:12
anatofuz
parents:
diff changeset
37 // CHECK-SUPER: Identifier: "T" [15:42 - 15:43] TypeRef=T:15:14
anatofuz
parents:
diff changeset
38 // CHECK-SUPER: Identifier: "U" [15:45 - 15:46] TypeRef=U:15:22