File: availability.mm

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (79 lines) | stat: -rw-r--r-- 2,786 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
__attribute__((availability(macosx, introduced = 8.0)))
@interface C {
  int i0;
  int i1 __attribute__((availability(macosx, introduced = 9.0)));
}
@property int p0;
@property int p1 __attribute__((availability(macosx, introduced=9.0)));
- (void)m0;
- (void)m1 __attribute__((availability(macosx, introduced = 9.0)));
@end

@implementation C
- (void)m0 {
}
- (void)m1 {
}
@end

__attribute__((availability(macosx, introduced = 10.0)))
@interface C(Cat)
@property int p2;
@property int p3 __attribute__((availability(macosx, introduced=11.0)));
- (void)m2;
- (void)m3 __attribute__((availability(macosx, introduced = 11.0)));
@end

@implementation C(Cat)
- (void)m2 {
}
- (void)m3 {
}
@end

__attribute__((availability(macosx, introduced = 10.0)))
@protocol P
@property int p4;
@property int p5 __attribute__((availability(macosx, introduced=11.0)));
- (void)m4;
- (void)m5 __attribute__((availability(macosx, introduced = 11.0)));
@end

@interface C(Cat2)
@end

@implementation C(Cat2)
@end

// RUN: c-index-test -test-print-type --std=c++11 %s | FileCheck %s

// CHECK: ObjCInterfaceDecl=C:2:12  (macos, introduced=8.0)
// CHECK: ObjCIvarDecl=i0:3:7 (Definition)  (macos, introduced=8.0)
// CHECK: ObjCIvarDecl=i1:4:7 (Definition)  (macos, introduced=9.0)
// CHECK: ObjCPropertyDecl=p0:6:15  (macos, introduced=8.0)
// CHECK: ObjCPropertyDecl=p1:7:15  (macos, introduced=9.0)
// CHECK: ObjCInstanceMethodDecl=m0:8:9  (macos, introduced=8.0)
// CHECK: ObjCInstanceMethodDecl=m1:9:9  (macos, introduced=9.0)

// CHECK: ObjCImplementationDecl=C:12:17 (Definition)  (macos, introduced=8.0)
// CHECK: ObjCInstanceMethodDecl=m0:13:9 (Definition)  (macos, introduced=8.0)
// CHECK: ObjCInstanceMethodDecl=m1:15:9 (Definition)  (macos, introduced=9.0)

// CHECK: ObjCCategoryDecl=Cat:20:12  (macos, introduced=10.0)
// CHECK: ObjCPropertyDecl=p2:21:15  (macos, introduced=10.0)
// CHECK: ObjCPropertyDecl=p3:22:15  (macos, introduced=11.0)
// CHECK: ObjCInstanceMethodDecl=m2:23:9  (macos, introduced=10.0)
// CHECK: ObjCInstanceMethodDecl=m3:24:9  (macos, introduced=11.0)

// CHECK: ObjCCategoryImplDecl=Cat:27:17 (Definition)  (macos, introduced=10.0)
// CHECK: ObjCInstanceMethodDecl=m2:28:9 (Definition)  (macos, introduced=10.0)
// CHECK: ObjCInstanceMethodDecl=m3:30:9 (Definition)  (macos, introduced=11.0)

// CHECK: ObjCProtocolDecl=P:35:11 (Definition)  (macos, introduced=10.0)
// CHECK: ObjCPropertyDecl=p4:36:15  (macos, introduced=10.0)
// CHECK: ObjCPropertyDecl=p5:37:15  (macos, introduced=11.0)
// CHECK: ObjCInstanceMethodDecl=m4:38:9  (macos, introduced=10.0)
// CHECK: ObjCInstanceMethodDecl=m5:39:9  (macos, introduced=11.0)

// CHECK: ObjCCategoryDecl=Cat2:42:12  (macos, introduced=8.0)
// CHECK: ObjCCategoryImplDecl=Cat2:45:17 (Definition)  (macos, introduced=8.0)