[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / index-attrs.m
blob574725562e40755add3744bd00a8991e8023133d
1 @class Foo;
2 @interface Bar
3 @property (retain) __attribute__((iboutletcollection(Foo))) Foo *prop;
4 @end
6 @interface I
7 -(id)prop __attribute__((annotate("anno")));
8 -(void)setProp:(id)p __attribute__((annotate("anno")));
9 @property (assign) id prop __attribute__((annotate("anno")));
10 @end
12 __attribute__((objc_protocol_requires_explicit_implementation))
13 @protocol P
14 @end
16 typedef id __attribute__((objc_independent_class)) T2;
17 id __attribute__((objc_precise_lifetime)) x;
18 struct __attribute__((objc_boxable)) S {
19   int x;
22 __attribute__((objc_exception))
23 __attribute__((objc_root_class))
24 __attribute__((objc_subclassing_restricted))
25 __attribute__((objc_runtime_visible))
26 @interface J
27 -(id)a __attribute__((ns_returns_retained));
28 -(id)b __attribute__((ns_returns_not_retained));
29 -(id)c __attribute__((ns_returns_autoreleased));
30 -(id)d __attribute__((ns_consumes_self));
31 -(id)e __attribute__((objc_requires_super));
32 -(int *)f __attribute__((objc_returns_inner_pointer));
33 -(id)init __attribute__((objc_designated_initializer));
34 @end
36 // RUN: c-index-test -index-file %s | FileCheck %s
37 // CHECK:      <attribute>: attribute(iboutletcollection)= [IBOutletCollection=ObjCInterface]
39 // CHECK: <attribute>: attribute(annotate)=anno
40 // CHECK: <getter>: kind: objc-instance-method | name: prop | {{.*}} <attribute>: attribute(annotate)=anno
41 // CHECK: <setter>: kind: objc-instance-method | name: setProp: | {{.*}} <attribute>: attribute(annotate)=anno
42 // CHECK: <attribute>: attribute(objc_protocol_requires_explicit_implementation)=
43 // CHECK: <attribute>: attribute(objc_independent_class)=
44 // CHECK: <attribute>: attribute(objc_precise_lifetime)=
45 // CHECK: <attribute>: attribute(objc_boxable)=
46 // CHECK: <attribute>: attribute(objc_exception)=
47 // CHECK: <attribute>: attribute(objc_root_class)=
48 // CHECK: <attribute>: attribute(objc_subclassing_restricted)=
49 // CHECK: <attribute>: attribute(objc_runtime_visible)=
50 // CHECK: <attribute>: attribute(ns_returns_retained)=
51 // CHECK: <attribute>: attribute(ns_returns_not_retained)=
52 // CHECK: <attribute>: attribute(ns_returns_autoreleased)=
53 // CHECK: <attribute>: attribute(ns_consumes_self)=
54 // CHECK: <attribute>: attribute(objc_requires_super)=
55 // CHECK: <attribute>: attribute(objc_returns_inner_pointer)=
56 // CHECK: <attribute>: attribute(objc_designated_initializer)=