Skip to content

Commit 41a82ef

Browse files
authored
Merge pull request #5285 from jrose-apple/modern-API-notes
[APINotes] Replace old FactoryAsInit annotation with equivalent SwiftNames.
2 parents 6ae16d0 + 37d3fe1 commit 41a82ef

File tree

7 files changed

+5
-491
lines changed

7 files changed

+5
-491
lines changed

apinotes/Foundation.apinotes

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Classes:
157157
Methods:
158158
- Selector: 'notificationCenterForType:'
159159
MethodKind: Class
160-
FactoryAsInit: C
160+
SwiftName: 'forType(_:)'
161161
- Name: NSHTTPCookie
162162
SwiftName: HTTPCookie
163163
- Name: NSHTTPCookieStorage
@@ -209,10 +209,6 @@ Classes:
209209
- Name: NSProcessInfo
210210
SwiftName: ProcessInfo
211211
Methods:
212-
- Selector: processInfo
213-
MethodKind: Class
214-
NullabilityOfRet: N
215-
FactoryAsInit: C
216212
- Selector: 'isOperatingSystemAtLeastVersion:'
217213
SwiftName: isOperatingSystemAtLeast(_:)
218214
MethodKind: Instance

apinotes/GameKit.apinotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Classes:
55
Methods:
66
- Selector: 'localPlayer'
77
MethodKind: Class
8-
FactoryAsInit: C
8+
SwiftName: 'localPlayer()'
99
Tags:
1010
- Name: GKErrorCode
1111
NSErrorDomain: GKErrorDomain

apinotes/NotificationCenter.apinotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Classes:
44
Methods:
55
- Selector: 'widgetController'
66
MethodKind: Class
7-
FactoryAsInit: C
7+
SwiftName: 'widgetController()'

apinotes/UIKit.apinotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Classes:
1010
Methods:
1111
- Selector: printInfo
1212
MethodKind: Class
13-
FactoryAsInit: C
13+
SwiftName: 'printInfo()'
1414
- Name: UIPrintInteractionController
1515
Properties:
1616
- Name: 'sharedPrintController'

test/ClangModules/objc_factory_method.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ func testNonsplittableFactoryMethod() {
9393

9494
func testFactoryMethodBlacklist() {
9595
_ = NCWidgetController.widgetController()
96-
_ = ProcessInfo.processInfo()
9796
}
9897

9998
func test17261609() {

test/Inputs/clang-importer-sdk/usr/include/Foundation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ NSSet *setToSet(NSSet *dict);
740740
@end
741741

742742
@interface NSProcessInfo : NSObject
743-
+ (nonnull NSProcessInfo *)processInfo;
743+
@property (class, readonly, strong, nonnull) NSProcessInfo *processInfo;
744744
@end
745745

746746
@interface NSString(FoundationExts)

0 commit comments

Comments
 (0)