[PATCH] D113433: [NFC][clang] Inclusive language: Rename myMaster in testcase

Quinn Pham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 16 09:46:53 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5ed404a4abd3: [NFC][clang] Inclusive language: Rename myMaster in testcase (authored by quinnp).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113433/new/

https://reviews.llvm.org/D113433

Files:
  clang/test/Rewriter/line-generation-test.m
  clang/test/SemaObjC/warn-direct-ivar-access.m


Index: clang/test/SemaObjC/warn-direct-ivar-access.m
===================================================================
--- clang/test/SemaObjC/warn-direct-ivar-access.m
+++ 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}}
Index: clang/test/Rewriter/line-generation-test.m
===================================================================
--- clang/test/Rewriter/line-generation-test.m
+++ 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 @@
 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;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113433.387691.patch
Type: text/x-patch
Size: 3293 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211116/33e8272a/attachment.bin>


More information about the cfe-commits mailing list