Skip to content

Commit 5ed404a

Browse files
Quinn PhamQuinn Pham
authored andcommitted
[NFC][clang] Inclusive language: Rename myMaster in testcase
[NFC] As part of using inclusive language within the llvm project, this patch replaces `_myMaster` with `_myLeader` in these testcases. Reviewed By: ZarkoCA Differential Revision: https://reviews.llvm.org/D113433
1 parent 5c539ea commit 5ed404a

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

clang/test/Rewriter/line-generation-test.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@
77

88
__attribute__((objc_root_class)) @interface MyObject {
99
@public
10-
id _myMaster;
10+
id _myLeader;
1111
id _isTickledPink;
1212
}
13-
@property(retain) id myMaster;
13+
@property(retain) id myLeader;
1414
@property(assign) id isTickledPink;
1515
@end
1616

1717
@implementation MyObject
1818

19-
@synthesize myMaster = _myMaster;
19+
@synthesize myLeader = _myLeader;
2020
@synthesize isTickledPink = _isTickledPink;
2121

2222
- (void) doSomething {
23-
_myMaster = _isTickledPink;
23+
_myLeader = _isTickledPink;
2424
}
2525

2626
@end
2727

2828
MyObject * foo ()
2929
{
3030
MyObject* p;
31-
p.isTickledPink = p.myMaster; // ok
32-
p->_isTickledPink = p->_myMaster;
31+
p.isTickledPink = p.myLeader; // ok
32+
p->_isTickledPink = p->_myLeader;
3333
return p->_isTickledPink;
3434
}
3535

clang/test/SemaObjC/warn-direct-ivar-access.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,39 @@
33

44
__attribute__((objc_root_class)) @interface MyObject {
55
@public
6-
id _myMaster;
6+
id _myLeader;
77
id _isTickledPink; // expected-error {{existing instance variable '_isTickledPink' for property 'isTickledPink'}}
88
int _myIntProp;
99
}
10-
@property(retain) id myMaster;
10+
@property(retain) id myLeader;
1111
@property(assign) id isTickledPink; // expected-note {{property declared here}}
1212
@property int myIntProp;
1313
@end
1414

1515
@implementation MyObject
1616

17-
@synthesize myMaster = _myMaster;
17+
@synthesize myLeader = _myLeader;
1818
@synthesize isTickledPink = _isTickledPink; // expected-note {{property synthesized here}}
1919
@synthesize myIntProp = _myIntProp;
2020

2121
- (void) doSomething {
22-
_myMaster = _isTickledPink; // expected-warning {{instance variable '_myMaster' is being directly accessed}} \
22+
_myLeader = _isTickledPink; // expected-warning {{instance variable '_myLeader' is being directly accessed}} \
2323
// expected-warning {{instance variable '_isTickledPink' is being directly accessed}}
2424
}
2525

2626
- (id) init {
27-
_myMaster=0;
28-
return _myMaster;
27+
_myLeader=0;
28+
return _myLeader;
2929
}
30-
- (void) dealloc { _myMaster = 0; }
30+
- (void) dealloc { _myLeader = 0; }
3131
@end
3232

3333
MyObject * foo ()
3434
{
3535
MyObject* p=0;
36-
p.isTickledPink = p.myMaster; // ok
37-
p->_isTickledPink = (*p)._myMaster; // expected-warning {{instance variable '_isTickledPink' is being directly accessed}} \
38-
// expected-warning {{instance variable '_myMaster' is being directly accessed}}
36+
p.isTickledPink = p.myLeader; // ok
37+
p->_isTickledPink = (*p)._myLeader; // expected-warning {{instance variable '_isTickledPink' is being directly accessed}} \
38+
// expected-warning {{instance variable '_myLeader' is being directly accessed}}
3939
if (p->_myIntProp) // expected-warning {{instance variable '_myIntProp' is being directly accessed}}
4040
p->_myIntProp = 0; // expected-warning {{instance variable '_myIntProp' is being directly accessed}}
4141
return p->_isTickledPink; // expected-warning {{instance variable '_isTickledPink' is being directly accessed}}

0 commit comments

Comments
 (0)