annotate clang/test/SemaObjC/synthesize-setter-contclass.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 %s
anatofuz
parents:
diff changeset
2 // expected-no-diagnostics
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @interface TestClass
anatofuz
parents:
diff changeset
5 {
anatofuz
parents:
diff changeset
6 int _isItIsOrIsItAint;
anatofuz
parents:
diff changeset
7 }
anatofuz
parents:
diff changeset
8 @property (readonly) int itIsOrItAint;
anatofuz
parents:
diff changeset
9 -(void) doSomething;
anatofuz
parents:
diff changeset
10 @end
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 @interface TestClass()
anatofuz
parents:
diff changeset
13 @property (readwrite) int itIsOrItAint;
anatofuz
parents:
diff changeset
14 @end
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 @implementation TestClass
anatofuz
parents:
diff changeset
17 @synthesize itIsOrItAint = _isItIsOrIsItAint;
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 -(void) doSomething
anatofuz
parents:
diff changeset
20 {
anatofuz
parents:
diff changeset
21 int i = [self itIsOrItAint];
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 [self setItIsOrItAint:(int)1];
anatofuz
parents:
diff changeset
24 }
anatofuz
parents:
diff changeset
25 @end