1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s |
2 | // rdar://10907410 |
3 | |
4 | @protocol P |
5 | @optional |
6 | @property int auto_opt_window; |
7 | @property int no_auto_opt_window; |
8 | @end |
9 | |
10 | @interface I<P> |
11 | @property int auto_opt_window; |
12 | @end |
13 | |
14 | @implementation I |
15 | @end |
16 | |
17 | @protocol P1 |
18 | @property int auto_req_window; |
19 | @property int no_auto_req_window; // expected-note {{property declared here}} |
20 | @end |
21 | |
22 | @interface I1<P1> |
23 | @property int auto_req_window; |
24 | @end |
25 | |
26 | @implementation I1 // expected-warning {{auto property synthesis will not synthesize property declared in a protocol}} |
27 | @end |
28 | |
29 | // CHECK: define internal i32 @"\01-[I auto_opt_window]"( |
30 | // CHECK: define internal void @"\01-[I setAuto_opt_window:]"( |
31 | // CHECK: define internal i32 @"\01-[I1 auto_req_window]"( |
32 | // CHECK: define internal void @"\01-[I1 setAuto_req_window:]"( |
33 | |
34 | // CHECK-NOT: define internal i32 @"\01-[I1 no_auto_opt_window]"( |
35 | // CHECK-NOT: define internal void @"\01-[I1 setNo_auto_opt_window:]"( |
36 | // CHECK-NOT: define internal i32 @"\01-[I no_auto_req_window]"( |
37 | // CHECK-NOT: define internal void @"\01-[I setNo_auto_req_window:]"( |
38 | |