[clang] 5ed404a - [NFC][clang] Inclusive language: Rename myMaster in testcase
Quinn Pham via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 16 09:46:47 PST 2021
Author: Quinn Pham
Date: 2021-11-16T11:46:43-06:00
New Revision: 5ed404a4abd3fc3559ecc9dfc6cee83fcc3796e6
URL: https://github.com/llvm/llvm-project/commit/5ed404a4abd3fc3559ecc9dfc6cee83fcc3796e6
DIFF: https://github.com/llvm/llvm-project/commit/5ed404a4abd3fc3559ecc9dfc6cee83fcc3796e6.diff
LOG: [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
Added:
Modified:
clang/test/Rewriter/line-generation-test.m
clang/test/SemaObjC/warn-direct-ivar-access.m
Removed:
################################################################################
diff --git a/clang/test/Rewriter/line-generation-test.m b/clang/test/Rewriter/line-generation-test.m
index cafdba2808479..5193775fbedb2 100644
--- a/clang/test/Rewriter/line-generation-test.m
+++ b/clang/test/Rewriter/line-generation-test.m
@@ -7,20 +7,20 @@
__attribute__((objc_root_class)) @interface MyObject {
@public
- id _myMaster;
+ id _myLeader;
id _isTickledPink;
}
- at property(retain) id myMaster;
+ at property(retain) id myLeader;
@property(assign) id isTickledPink;
@end
@implementation MyObject
- at synthesize myMaster = _myMaster;
+ at synthesize myLeader = _myLeader;
@synthesize isTickledPink = _isTickledPink;
- (void) doSomething {
- _myMaster = _isTickledPink;
+ _myLeader = _isTickledPink;
}
@end
@@ -28,8 +28,8 @@ - (void) doSomething {
MyObject * foo ()
{
MyObject* p;
- p.isTickledPink = p.myMaster; // ok
- p->_isTickledPink = p->_myMaster;
+ p.isTickledPink = p.myLeader; // ok
+ p->_isTickledPink = p->_myLeader;
return p->_isTickledPink;
}
diff --git a/clang/test/SemaObjC/warn-direct-ivar-access.m b/clang/test/SemaObjC/warn-direct-ivar-access.m
index d34e5f1894d2e..946e516aad8fb 100644
--- a/clang/test/SemaObjC/warn-direct-ivar-access.m
+++ b/clang/test/SemaObjC/warn-direct-ivar-access.m
@@ -3,39 +3,39 @@
__attribute__((objc_root_class)) @interface MyObject {
@public
- id _myMaster;
+ id _myLeader;
id _isTickledPink; // expected-error {{existing instance variable '_isTickledPink' for property 'isTickledPink'}}
int _myIntProp;
}
- at property(retain) id myMaster;
+ at property(retain) id myLeader;
@property(assign) id isTickledPink; // expected-note {{property declared here}}
@property int myIntProp;
@end
@implementation MyObject
- at synthesize myMaster = _myMaster;
+ at synthesize myLeader = _myLeader;
@synthesize isTickledPink = _isTickledPink; // expected-note {{property synthesized here}}
@synthesize myIntProp = _myIntProp;
- (void) doSomething {
- _myMaster = _isTickledPink; // expected-warning {{instance variable '_myMaster' is being directly accessed}} \
+ _myLeader = _isTickledPink; // expected-warning {{instance variable '_myLeader' is being directly accessed}} \
// expected-warning {{instance variable '_isTickledPink' is being directly accessed}}
}
- (id) init {
- _myMaster=0;
- return _myMaster;
+ _myLeader=0;
+ return _myLeader;
}
-- (void) dealloc { _myMaster = 0; }
+- (void) dealloc { _myLeader = 0; }
@end
MyObject * foo ()
{
MyObject* p=0;
- p.isTickledPink = p.myMaster; // ok
- p->_isTickledPink = (*p)._myMaster; // expected-warning {{instance variable '_isTickledPink' is being directly accessed}} \
- // expected-warning {{instance variable '_myMaster' is being directly accessed}}
+ p.isTickledPink = p.myLeader; // ok
+ p->_isTickledPink = (*p)._myLeader; // expected-warning {{instance variable '_isTickledPink' is being directly accessed}} \
+ // expected-warning {{instance variable '_myLeader' is being directly accessed}}
if (p->_myIntProp) // expected-warning {{instance variable '_myIntProp' is being directly accessed}}
p->_myIntProp = 0; // expected-warning {{instance variable '_myIntProp' is being directly accessed}}
return p->_isTickledPink; // expected-warning {{instance variable '_isTickledPink' is being directly accessed}}
More information about the cfe-commits
mailing list