annotate clang/test/SemaObjC/unimplemented-protocol-prop.m @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +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 -fsyntax-only -verify -Wno-objc-root-class -disable-objc-default-synthesize-properties %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 @protocol PROTOCOL0
anatofuz
parents:
diff changeset
4 @required
anatofuz
parents:
diff changeset
5 @property float MyProperty0; // expected-note 2 {{property declared}}
anatofuz
parents:
diff changeset
6 @end
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 @protocol PROTOCOL<PROTOCOL0>
anatofuz
parents:
diff changeset
9 @required
anatofuz
parents:
diff changeset
10 @property float MyProperty; // expected-note 2 {{property declared}}
anatofuz
parents:
diff changeset
11 @optional
anatofuz
parents:
diff changeset
12 @property float OptMyProperty;
anatofuz
parents:
diff changeset
13 @end
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 @interface I <PROTOCOL>
anatofuz
parents:
diff changeset
16 @end
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 @implementation I @end // expected-warning {{property 'MyProperty0' requires method 'MyProperty0' to be defined}} \
anatofuz
parents:
diff changeset
19 // expected-warning {{property 'MyProperty0' requires method 'setMyProperty0:' to be defined}}\
anatofuz
parents:
diff changeset
20 // expected-warning {{property 'MyProperty' requires method 'MyProperty' to be defined}} \
anatofuz
parents:
diff changeset
21 // expected-warning {{property 'MyProperty' requires method 'setMyProperty:' to be defined}}
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 // rdar://10120691
anatofuz
parents:
diff changeset
24 // property is implemented in super class. No warning
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 @protocol PROTOCOL1
anatofuz
parents:
diff changeset
27 @property int MyProp;
anatofuz
parents:
diff changeset
28 @end
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 @interface superclass
anatofuz
parents:
diff changeset
31 @property int MyProp;
anatofuz
parents:
diff changeset
32 @end
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 @interface childclass : superclass <PROTOCOL1>
anatofuz
parents:
diff changeset
35 @end
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 @implementation childclass
anatofuz
parents:
diff changeset
38 @end
anatofuz
parents:
diff changeset
39