quinnp created this revision.
quinnp requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

[NFC] This patch replaces `masterPort` with `mainPort` in these
testcases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113505

Files:
  clang/test/ARCMT/objcmt-arc-cf-annotations.m
  clang/test/ARCMT/objcmt-arc-cf-annotations.m.result
  clang/test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist
  clang/test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist
  clang/test/Analysis/retain-release-inline.m
  clang/test/Analysis/retain-release.m
  clang/test/Analysis/retain-release.mm

Index: clang/test/Analysis/retain-release.mm
===================================================================
--- clang/test/Analysis/retain-release.mm
+++ clang/test/Analysis/retain-release.mm
@@ -175,14 +175,14 @@
 typedef io_object_t io_service_t;
 typedef struct IONotificationPort * IONotificationPortRef;
 typedef void (*IOServiceMatchingCallback)(  void * refcon,  io_iterator_t iterator );
-io_service_t IOServiceGetMatchingService(  mach_port_t masterPort,  CFDictionaryRef matching );
-kern_return_t IOServiceGetMatchingServices(  mach_port_t masterPort,  CFDictionaryRef matching,  io_iterator_t * existing );
-kern_return_t IOServiceAddNotification(  mach_port_t masterPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated));
+io_service_t IOServiceGetMatchingService(  mach_port_t mainPort,  CFDictionaryRef matching );
+kern_return_t IOServiceGetMatchingServices(  mach_port_t mainPort,  CFDictionaryRef matching,  io_iterator_t * existing );
+kern_return_t IOServiceAddNotification(  mach_port_t mainPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated));
 kern_return_t IOServiceAddMatchingNotification(  IONotificationPortRef notifyPort,  const io_name_t notificationType,  CFDictionaryRef matching,         IOServiceMatchingCallback callback,         void * refCon,  io_iterator_t * notification );
 CFMutableDictionaryRef IOServiceMatching(  const char * name );
 CFMutableDictionaryRef IOServiceNameMatching(  const char * name );
-CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t masterPort,  uint32_t options,  const char * bsdName );
-CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t masterPort,  uint32_t options,  const char * path );
+CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t mainPort,  uint32_t options,  const char * bsdName );
+CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t mainPort,  uint32_t options,  const char * path );
 CFMutableDictionaryRef IORegistryEntryIDMatching(  uint64_t entryID );
 typedef struct __DASession * DASessionRef;
 extern DASessionRef DASessionCreate( CFAllocatorRef allocator );
Index: clang/test/Analysis/retain-release.m
===================================================================
--- clang/test/Analysis/retain-release.m
+++ clang/test/Analysis/retain-release.m
@@ -233,14 +233,14 @@
 typedef io_object_t io_service_t;
 typedef struct IONotificationPort * IONotificationPortRef;
 typedef void (*IOServiceMatchingCallback)(  void * refcon,  io_iterator_t iterator );
-io_service_t IOServiceGetMatchingService(  mach_port_t masterPort,  CFDictionaryRef matching );
-kern_return_t IOServiceGetMatchingServices(  mach_port_t masterPort,  CFDictionaryRef matching,  io_iterator_t * existing );
-kern_return_t IOServiceAddNotification(  mach_port_t masterPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' has been explicitly marked deprecated here}}
+io_service_t IOServiceGetMatchingService(  mach_port_t mainPort,  CFDictionaryRef matching );
+kern_return_t IOServiceGetMatchingServices(  mach_port_t mainPort,  CFDictionaryRef matching,  io_iterator_t * existing );
+kern_return_t IOServiceAddNotification(  mach_port_t mainPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' has been explicitly marked deprecated here}}
 kern_return_t IOServiceAddMatchingNotification(  IONotificationPortRef notifyPort,  const io_name_t notificationType,  CFDictionaryRef matching,         IOServiceMatchingCallback callback,         void * refCon,  io_iterator_t * notification );
 CFMutableDictionaryRef IOServiceMatching(  const char * name );
 CFMutableDictionaryRef IOServiceNameMatching(  const char * name );
-CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t masterPort,  uint32_t options,  const char * bsdName );
-CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t masterPort,  uint32_t options,  const char * path );
+CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t mainPort,  uint32_t options,  const char * bsdName );
+CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t mainPort,  uint32_t options,  const char * path );
 CFMutableDictionaryRef IORegistryEntryIDMatching(  uint64_t entryID );
 typedef struct __DASession * DASessionRef;
 extern DASessionRef DASessionCreate( CFAllocatorRef allocator );
@@ -1070,8 +1070,8 @@
 //                          checker
 //===----------------------------------------------------------------------===//
 
-void IOBSDNameMatching_wrapper(mach_port_t masterPort, uint32_t options,  const char * bsdName) {  
-  IOBSDNameMatching(masterPort, options, bsdName); // expected-warning{{leak}}
+void IOBSDNameMatching_wrapper(mach_port_t mainPort, uint32_t options,  const char * bsdName) {  
+  IOBSDNameMatching(mainPort, options, bsdName); // expected-warning{{leak}}
 }
 
 void IOServiceMatching_wrapper(const char * name) {
@@ -1084,12 +1084,12 @@
 
 CF_RETURNS_RETAINED CFDictionaryRef CreateDict();
 
-void IOServiceAddNotification_wrapper(mach_port_t masterPort, const io_name_t notificationType,
+void IOServiceAddNotification_wrapper(mach_port_t mainPort, const io_name_t notificationType,
   mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) {
 
   CFDictionaryRef matching = CreateDict();
   CFRelease(matching);
-  IOServiceAddNotification(masterPort, notificationType, matching, // expected-warning{{used after it is released}} expected-warning{{deprecated}}
+  IOServiceAddNotification(mainPort, notificationType, matching, // expected-warning{{used after it is released}} expected-warning{{deprecated}}
                            wakePort, reference, notification);
 }
 
@@ -1097,20 +1097,20 @@
   IORegistryEntryIDMatching(entryID); // expected-warning{{leak}}
 }
 
-void IOOpenFirmwarePathMatching_wrapper(mach_port_t masterPort, uint32_t options,
+void IOOpenFirmwarePathMatching_wrapper(mach_port_t mainPort, uint32_t options,
                                         const char * path) {
-  IOOpenFirmwarePathMatching(masterPort, options, path); // expected-warning{{leak}}
+  IOOpenFirmwarePathMatching(mainPort, options, path); // expected-warning{{leak}}
 }
 
-void IOServiceGetMatchingService_wrapper(mach_port_t masterPort) {
+void IOServiceGetMatchingService_wrapper(mach_port_t mainPort) {
   CFDictionaryRef matching = CreateDict();
-  IOServiceGetMatchingService(masterPort, matching);
+  IOServiceGetMatchingService(mainPort, matching);
   CFRelease(matching); // expected-warning{{used after it is released}}
 }
 
-void IOServiceGetMatchingServices_wrapper(mach_port_t masterPort, io_iterator_t *existing) {
+void IOServiceGetMatchingServices_wrapper(mach_port_t mainPort, io_iterator_t *existing) {
   CFDictionaryRef matching = CreateDict();
-  IOServiceGetMatchingServices(masterPort, matching, existing);
+  IOServiceGetMatchingServices(mainPort, matching, existing);
   CFRelease(matching); // expected-warning{{used after it is released}}
 }
 
Index: clang/test/Analysis/retain-release-inline.m
===================================================================
--- clang/test/Analysis/retain-release-inline.m
+++ clang/test/Analysis/retain-release-inline.m
@@ -155,14 +155,14 @@
 typedef io_object_t io_service_t;
 typedef struct IONotificationPort * IONotificationPortRef;
 typedef void (*IOServiceMatchingCallback)(  void * refcon,  io_iterator_t iterator );
-io_service_t IOServiceGetMatchingService(  mach_port_t masterPort,  CFDictionaryRef matching );
-kern_return_t IOServiceGetMatchingServices(  mach_port_t masterPort,  CFDictionaryRef matching,  io_iterator_t * existing );
-kern_return_t IOServiceAddNotification(  mach_port_t masterPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated));
+io_service_t IOServiceGetMatchingService(  mach_port_t mainPort,  CFDictionaryRef matching );
+kern_return_t IOServiceGetMatchingServices(  mach_port_t mainPort,  CFDictionaryRef matching,  io_iterator_t * existing );
+kern_return_t IOServiceAddNotification(  mach_port_t mainPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated));
 kern_return_t IOServiceAddMatchingNotification(  IONotificationPortRef notifyPort,  const io_name_t notificationType,  CFDictionaryRef matching,         IOServiceMatchingCallback callback,         void * refCon,  io_iterator_t * notification );
 CFMutableDictionaryRef IOServiceMatching(  const char * name );
 CFMutableDictionaryRef IOServiceNameMatching(  const char * name );
-CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t masterPort,  uint32_t options,  const char * bsdName );
-CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t masterPort,  uint32_t options,  const char * path );
+CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t mainPort,  uint32_t options,  const char * bsdName );
+CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t mainPort,  uint32_t options,  const char * path );
 CFMutableDictionaryRef IORegistryEntryIDMatching(  uint64_t entryID );
 typedef struct __DASession * DASessionRef;
 extern DASessionRef DASessionCreate( CFAllocatorRef allocator );
Index: clang/test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist
===================================================================
--- clang/test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist
+++ clang/test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist
@@ -13595,7 +13595,7 @@
         </dict>
         <dict>
          <key>line</key><integer>1074</integer>
-         <key>col</key><integer>49</integer>
+         <key>col</key><integer>47</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -13660,7 +13660,7 @@
    <key>type</key><string>Leak</string>
    <key>check_name</key><string>osx.cocoa.RetainCount</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>540e0145994c1e14ea750fe91a497855</string>
+   <key>issue_hash_content_of_line_in_context</key><string>646df6701094605a8d6cfc0086d99e19</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>IOBSDNameMatching_wrapper</string>
   <key>issue_hash_function_offset</key><string>1</string>
@@ -14046,12 +14046,12 @@
        <array>
         <dict>
          <key>line</key><integer>1092</integer>
-         <key>col</key><integer>58</integer>
+         <key>col</key><integer>56</integer>
          <key>file</key><integer>0</integer>
         </dict>
         <dict>
          <key>line</key><integer>1092</integer>
-         <key>col</key><integer>65</integer>
+         <key>col</key><integer>63</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -14068,7 +14068,7 @@
    <key>type</key><string>Use-after-release</string>
    <key>check_name</key><string>osx.cocoa.RetainCount</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>84a53bfb58a3a929535b47e28b997382</string>
+   <key>issue_hash_content_of_line_in_context</key><string>7bb07bd5b2685d66ce9454c2eecd2fe2</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>IOServiceAddNotification_wrapper</string>
   <key>issue_hash_function_offset</key><string>4</string>
@@ -14218,7 +14218,7 @@
         </dict>
         <dict>
          <key>line</key><integer>1102</integer>
-         <key>col</key><integer>55</integer>
+         <key>col</key><integer>53</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -14283,7 +14283,7 @@
    <key>type</key><string>Leak</string>
    <key>check_name</key><string>osx.cocoa.RetainCount</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>ee83ca968ddc2ecad7ae4318ce7d1d95</string>
+   <key>issue_hash_content_of_line_in_context</key><string>978acda8588031f1569c1b542f39d92a</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>IOOpenFirmwarePathMatching_wrapper</string>
   <key>issue_hash_function_offset</key><string>1</string>
@@ -14388,19 +14388,19 @@
         </dict>
         <dict>
          <key>line</key><integer>1107</integer>
-         <key>col</key><integer>51</integer>
+         <key>col</key><integer>49</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
        <array>
         <dict>
          <key>line</key><integer>1107</integer>
-         <key>col</key><integer>43</integer>
+         <key>col</key><integer>41</integer>
          <key>file</key><integer>0</integer>
         </dict>
         <dict>
          <key>line</key><integer>1107</integer>
-         <key>col</key><integer>50</integer>
+         <key>col</key><integer>48</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -14585,19 +14585,19 @@
         </dict>
         <dict>
          <key>line</key><integer>1113</integer>
-         <key>col</key><integer>62</integer>
+         <key>col</key><integer>60</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
        <array>
         <dict>
          <key>line</key><integer>1113</integer>
-         <key>col</key><integer>44</integer>
+         <key>col</key><integer>42</integer>
          <key>file</key><integer>0</integer>
         </dict>
         <dict>
          <key>line</key><integer>1113</integer>
-         <key>col</key><integer>51</integer>
+         <key>col</key><integer>49</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
Index: clang/test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist
===================================================================
--- clang/test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist
+++ clang/test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist
@@ -13527,7 +13527,7 @@
         </dict>
         <dict>
          <key>line</key><integer>1074</integer>
-         <key>col</key><integer>49</integer>
+         <key>col</key><integer>47</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -13592,7 +13592,7 @@
    <key>type</key><string>Leak</string>
    <key>check_name</key><string>osx.cocoa.RetainCount</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>540e0145994c1e14ea750fe91a497855</string>
+   <key>issue_hash_content_of_line_in_context</key><string>646df6701094605a8d6cfc0086d99e19</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>IOBSDNameMatching_wrapper</string>
   <key>issue_hash_function_offset</key><string>1</string>
@@ -13978,12 +13978,12 @@
        <array>
         <dict>
          <key>line</key><integer>1092</integer>
-         <key>col</key><integer>58</integer>
+         <key>col</key><integer>56</integer>
          <key>file</key><integer>0</integer>
         </dict>
         <dict>
          <key>line</key><integer>1092</integer>
-         <key>col</key><integer>65</integer>
+         <key>col</key><integer>63</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -14000,7 +14000,7 @@
    <key>type</key><string>Use-after-release</string>
    <key>check_name</key><string>osx.cocoa.RetainCount</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>84a53bfb58a3a929535b47e28b997382</string>
+   <key>issue_hash_content_of_line_in_context</key><string>7bb07bd5b2685d66ce9454c2eecd2fe2</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>IOServiceAddNotification_wrapper</string>
   <key>issue_hash_function_offset</key><string>4</string>
@@ -14150,7 +14150,7 @@
         </dict>
         <dict>
          <key>line</key><integer>1102</integer>
-         <key>col</key><integer>55</integer>
+         <key>col</key><integer>53</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -14215,7 +14215,7 @@
    <key>type</key><string>Leak</string>
    <key>check_name</key><string>osx.cocoa.RetainCount</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>ee83ca968ddc2ecad7ae4318ce7d1d95</string>
+   <key>issue_hash_content_of_line_in_context</key><string>978acda8588031f1569c1b542f39d92a</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>IOOpenFirmwarePathMatching_wrapper</string>
   <key>issue_hash_function_offset</key><string>1</string>
@@ -14320,19 +14320,19 @@
         </dict>
         <dict>
          <key>line</key><integer>1107</integer>
-         <key>col</key><integer>51</integer>
+         <key>col</key><integer>49</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
        <array>
         <dict>
          <key>line</key><integer>1107</integer>
-         <key>col</key><integer>43</integer>
+         <key>col</key><integer>41</integer>
          <key>file</key><integer>0</integer>
         </dict>
         <dict>
          <key>line</key><integer>1107</integer>
-         <key>col</key><integer>50</integer>
+         <key>col</key><integer>48</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
@@ -14517,19 +14517,19 @@
         </dict>
         <dict>
          <key>line</key><integer>1113</integer>
-         <key>col</key><integer>62</integer>
+         <key>col</key><integer>60</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
        <array>
         <dict>
          <key>line</key><integer>1113</integer>
-         <key>col</key><integer>44</integer>
+         <key>col</key><integer>42</integer>
          <key>file</key><integer>0</integer>
         </dict>
         <dict>
          <key>line</key><integer>1113</integer>
-         <key>col</key><integer>51</integer>
+         <key>col</key><integer>49</integer>
          <key>file</key><integer>0</integer>
         </dict>
        </array>
Index: clang/test/ARCMT/objcmt-arc-cf-annotations.m.result
===================================================================
--- clang/test/ARCMT/objcmt-arc-cf-annotations.m.result
+++ clang/test/ARCMT/objcmt-arc-cf-annotations.m.result
@@ -229,20 +229,20 @@
 
 CF_IMPLICIT_BRIDGING_ENABLED
 
-io_service_t IOServiceGetMatchingService(  mach_port_t masterPort,  CFDictionaryRef matching );
-kern_return_t IOServiceGetMatchingServices(  mach_port_t masterPort,  CFDictionaryRef matching,  io_iterator_t * existing );
+io_service_t IOServiceGetMatchingService(  mach_port_t mainPort,  CFDictionaryRef matching );
+kern_return_t IOServiceGetMatchingServices(  mach_port_t mainPort,  CFDictionaryRef matching,  io_iterator_t * existing );
 
 CF_IMPLICIT_BRIDGING_DISABLED
 
-kern_return_t IOServiceAddNotification(  mach_port_t masterPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' declared here}}
+kern_return_t IOServiceAddNotification(  mach_port_t mainPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' declared here}}
 kern_return_t IOServiceAddMatchingNotification(  IONotificationPortRef notifyPort,  const io_name_t notificationType,  CFDictionaryRef CF_CONSUMED matching,         IOServiceMatchingCallback callback,         void * refCon,  io_iterator_t * notification );
 
 CF_IMPLICIT_BRIDGING_ENABLED
 
 CFMutableDictionaryRef IOServiceMatching(  const char * name );
 CFMutableDictionaryRef IOServiceNameMatching(  const char * name );
-CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t masterPort,  uint32_t options,  const char * bsdName );
-CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t masterPort,  uint32_t options,  const char * path );
+CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t mainPort,  uint32_t options,  const char * bsdName );
+CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t mainPort,  uint32_t options,  const char * path );
 CFMutableDictionaryRef IORegistryEntryIDMatching(  uint64_t entryID );
 
 CF_IMPLICIT_BRIDGING_DISABLED
@@ -1006,8 +1006,8 @@
 //                          checker
 //===----------------------------------------------------------------------===//
 
-void IOBSDNameMatching_wrapper(mach_port_t masterPort, uint32_t options,  const char * bsdName) {  
-  IOBSDNameMatching(masterPort, options, bsdName); // expected-warning{{leak}}
+void IOBSDNameMatching_wrapper(mach_port_t mainPort, uint32_t options,  const char * bsdName) {  
+  IOBSDNameMatching(mainPort, options, bsdName); // expected-warning{{leak}}
 }
 
 void IOServiceMatching_wrapper(const char * name) {
@@ -1020,12 +1020,12 @@
 
 CF_RETURNS_RETAINED CFDictionaryRef CreateDict();
 
-void IOServiceAddNotification_wrapper(mach_port_t masterPort, const io_name_t notificationType,
+void IOServiceAddNotification_wrapper(mach_port_t mainPort, const io_name_t notificationType,
   mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) {
 
   CFDictionaryRef matching = CreateDict();
   CFRelease(matching);
-  IOServiceAddNotification(masterPort, notificationType, matching, // expected-warning{{used after it is released}} expected-warning{{deprecated}}
+  IOServiceAddNotification(mainPort, notificationType, matching, // expected-warning{{used after it is released}} expected-warning{{deprecated}}
                            wakePort, reference, notification);
 }
 
@@ -1033,20 +1033,20 @@
   IORegistryEntryIDMatching(entryID); // expected-warning{{leak}}
 }
 
-void IOOpenFirmwarePathMatching_wrapper(mach_port_t masterPort, uint32_t options,
+void IOOpenFirmwarePathMatching_wrapper(mach_port_t mainPort, uint32_t options,
                                         const char * path) {
-  IOOpenFirmwarePathMatching(masterPort, options, path); // expected-warning{{leak}}
+  IOOpenFirmwarePathMatching(mainPort, options, path); // expected-warning{{leak}}
 }
 
-void IOServiceGetMatchingService_wrapper(mach_port_t masterPort) {
+void IOServiceGetMatchingService_wrapper(mach_port_t mainPort) {
   CFDictionaryRef matching = CreateDict();
-  IOServiceGetMatchingService(masterPort, matching);
+  IOServiceGetMatchingService(mainPort, matching);
   CFRelease(matching); // expected-warning{{used after it is released}}
 }
 
-void IOServiceGetMatchingServices_wrapper(mach_port_t masterPort, io_iterator_t *existing) {
+void IOServiceGetMatchingServices_wrapper(mach_port_t mainPort, io_iterator_t *existing) {
   CFDictionaryRef matching = CreateDict();
-  IOServiceGetMatchingServices(masterPort, matching, existing);
+  IOServiceGetMatchingServices(mainPort, matching, existing);
   CFRelease(matching); // expected-warning{{used after it is released}}
 }
 
Index: clang/test/ARCMT/objcmt-arc-cf-annotations.m
===================================================================
--- clang/test/ARCMT/objcmt-arc-cf-annotations.m
+++ clang/test/ARCMT/objcmt-arc-cf-annotations.m
@@ -220,14 +220,14 @@
 typedef io_object_t io_service_t;
 typedef struct IONotificationPort * IONotificationPortRef;
 typedef void (*IOServiceMatchingCallback)(  void * refcon,  io_iterator_t iterator );
-io_service_t IOServiceGetMatchingService(  mach_port_t masterPort,  CFDictionaryRef matching );
-kern_return_t IOServiceGetMatchingServices(  mach_port_t masterPort,  CFDictionaryRef matching,  io_iterator_t * existing );
-kern_return_t IOServiceAddNotification(  mach_port_t masterPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' declared here}}
+io_service_t IOServiceGetMatchingService(  mach_port_t mainPort,  CFDictionaryRef matching );
+kern_return_t IOServiceGetMatchingServices(  mach_port_t mainPort,  CFDictionaryRef matching,  io_iterator_t * existing );
+kern_return_t IOServiceAddNotification(  mach_port_t mainPort,  const io_name_t notificationType,  CFDictionaryRef matching,  mach_port_t wakePort,  uintptr_t reference,  io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' declared here}}
 kern_return_t IOServiceAddMatchingNotification(  IONotificationPortRef notifyPort,  const io_name_t notificationType,  CFDictionaryRef matching,         IOServiceMatchingCallback callback,         void * refCon,  io_iterator_t * notification );
 CFMutableDictionaryRef IOServiceMatching(  const char * name );
 CFMutableDictionaryRef IOServiceNameMatching(  const char * name );
-CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t masterPort,  uint32_t options,  const char * bsdName );
-CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t masterPort,  uint32_t options,  const char * path );
+CFMutableDictionaryRef IOBSDNameMatching(  mach_port_t mainPort,  uint32_t options,  const char * bsdName );
+CFMutableDictionaryRef IOOpenFirmwarePathMatching(  mach_port_t mainPort,  uint32_t options,  const char * path );
 CFMutableDictionaryRef IORegistryEntryIDMatching(  uint64_t entryID );
 typedef struct __DASession * DASessionRef;
 extern DASessionRef DASessionCreate( CFAllocatorRef allocator );
@@ -964,8 +964,8 @@
 //                          checker
 //===----------------------------------------------------------------------===//
 
-void IOBSDNameMatching_wrapper(mach_port_t masterPort, uint32_t options,  const char * bsdName) {  
-  IOBSDNameMatching(masterPort, options, bsdName); // expected-warning{{leak}}
+void IOBSDNameMatching_wrapper(mach_port_t mainPort, uint32_t options,  const char * bsdName) {  
+  IOBSDNameMatching(mainPort, options, bsdName); // expected-warning{{leak}}
 }
 
 void IOServiceMatching_wrapper(const char * name) {
@@ -978,12 +978,12 @@
 
 CF_RETURNS_RETAINED CFDictionaryRef CreateDict();
 
-void IOServiceAddNotification_wrapper(mach_port_t masterPort, const io_name_t notificationType,
+void IOServiceAddNotification_wrapper(mach_port_t mainPort, const io_name_t notificationType,
   mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) {
 
   CFDictionaryRef matching = CreateDict();
   CFRelease(matching);
-  IOServiceAddNotification(masterPort, notificationType, matching, // expected-warning{{used after it is released}} expected-warning{{deprecated}}
+  IOServiceAddNotification(mainPort, notificationType, matching, // expected-warning{{used after it is released}} expected-warning{{deprecated}}
                            wakePort, reference, notification);
 }
 
@@ -991,20 +991,20 @@
   IORegistryEntryIDMatching(entryID); // expected-warning{{leak}}
 }
 
-void IOOpenFirmwarePathMatching_wrapper(mach_port_t masterPort, uint32_t options,
+void IOOpenFirmwarePathMatching_wrapper(mach_port_t mainPort, uint32_t options,
                                         const char * path) {
-  IOOpenFirmwarePathMatching(masterPort, options, path); // expected-warning{{leak}}
+  IOOpenFirmwarePathMatching(mainPort, options, path); // expected-warning{{leak}}
 }
 
-void IOServiceGetMatchingService_wrapper(mach_port_t masterPort) {
+void IOServiceGetMatchingService_wrapper(mach_port_t mainPort) {
   CFDictionaryRef matching = CreateDict();
-  IOServiceGetMatchingService(masterPort, matching);
+  IOServiceGetMatchingService(mainPort, matching);
   CFRelease(matching); // expected-warning{{used after it is released}}
 }
 
-void IOServiceGetMatchingServices_wrapper(mach_port_t masterPort, io_iterator_t *existing) {
+void IOServiceGetMatchingServices_wrapper(mach_port_t mainPort, io_iterator_t *existing) {
   CFDictionaryRef matching = CreateDict();
-  IOServiceGetMatchingServices(masterPort, matching, existing);
+  IOServiceGetMatchingServices(mainPort, matching, existing);
   CFRelease(matching); // expected-warning{{used after it is released}}
 }
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to