4 - (unsigned)retainCount;
5 - (oneway void)release;
9 @interface NSObject <NSObject> {}
22 @interface A : NSObject
26 A *__unsafe_unretained unsafeObj;
31 void test1(A *a, struct UnsafeS *unsafeS) {
32 [unsafeS->unsafeObj retain];
33 id foo = [unsafeS->unsafeObj retain]; // no warning.
38 // RUN: not %clang_cc1 -arcmt-action=check -triple x86_64-apple-darwin10 %s -serialize-diagnostic-file %t.diag
39 // RUN: c-index-test -read-diagnostics %t.diag > %t 2>&1
40 // RUN: FileCheck --input-file=%t %s
42 // CHECK: {{.*}}check-with-serialized-diag.m:32:4: error: [rewriter] it is not safe to remove 'retain' message on an __unsafe_unretained type
43 // CHECK-NEXT: Number FIXITs = 0
44 // CHECK-NEXT: {{.*}}check-with-serialized-diag.m:34:4: error: [rewriter] it is not safe to remove 'retain' message on a global variable
45 // CHECK-NEXT: Number FIXITs = 0
46 // CHECK-NEXT: {{.*}}check-with-serialized-diag.m:32:23: error: ARC forbids explicit message send of 'retain'
47 // CHECK-NEXT: Range: {{.*}}check-with-serialized-diag.m:32:4 {{.*}}check-with-serialized-diag.m:32:22
48 // CHECK-NEXT: Number FIXITs = 0
49 // CHECK-NEXT: {{.*}}check-with-serialized-diag.m:34:15: error: ARC forbids explicit message send of 'retain'
50 // CHECK-NEXT: Range: {{.*}}check-with-serialized-diag.m:34:4 {{.*}}check-with-serialized-diag.m:34:14
51 // CHECK-NEXT: Number FIXITs = 0
52 // CHECK-NEXT: {{.*}}check-with-serialized-diag.m:35:6: error: ARC forbids explicit message send of 'retainCount'
53 // CHECK-NEXT: Range: {{.*}}check-with-serialized-diag.m:35:4 {{.*}}check-with-serialized-diag.m:35:5
54 // CHECK-NEXT: Number FIXITs = 0