annotate clang/test/SemaObjC/arc-no-runtime.m @ 180:680fa57a2f20

fix compile errors.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 30 May 2020 17:44:06 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fobjc-arc -verify -Wno-objc-root-class %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // rdar://problem/9150784
anatofuz
parents:
diff changeset
4 void test(void) {
anatofuz
parents:
diff changeset
5 __weak id x; // expected-error {{cannot create __weak reference because the current deployment target does not support weak references}}
anatofuz
parents:
diff changeset
6 __weak void *v; // expected-warning {{'__weak' only applies to Objective-C object or block pointer types}}
anatofuz
parents:
diff changeset
7 }
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 @interface A
anatofuz
parents:
diff changeset
10 @property (weak) id testObjectWeakProperty; // expected-note {{declared here}}
anatofuz
parents:
diff changeset
11 @end
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 @implementation A
anatofuz
parents:
diff changeset
14 // rdar://9605088
anatofuz
parents:
diff changeset
15 @synthesize testObjectWeakProperty; // expected-error {{cannot synthesize weak property because the current deployment target does not support weak references}}
anatofuz
parents:
diff changeset
16 @end