Commit Graph

3 Commits

Author SHA1 Message Date
Doug Gregor
71882c6516 [API Notes] Use API notes rather than overlays to make error enums bridge.
The Clang attribute allows one to state that a particular enumeration
type describes an error, and associates it with a particular domain
constant. However, due to lack of API notes support, this attribute
wasn't actually getting used. Instead, we had a number of explicit
extensions to enum types to make them conform to the _BridgedNSError
protocol explicitly.

Now that we have API notes, use them to make these enums into error
enums with the appropriate domain, so that the Clang importer will
synthesize the _BridgedNSError conformances. Then, remove all of the
explicit conformances---and with them, the overlays for 12 frameworks.

There is a small fix to more eagerly consider these conformances as
"used" if an expression is formed with the error enum as a value
type. This better ensures that the conformances will be available at
runtime when needed.

This cleanup is needed to implement SE-0112 (NSError bridging),
although it is useful by itself.
2016-07-06 09:54:59 -07:00
Jordan Rose
70e3ebb8f4 [APINotes] Fix mistyped selector in 4091e54d.
Note that the Swift name here is deliberately different from the
Objective-C name. It is the authorization that changed, even though
the argument is an authorization status.

    - (void)locationManager:(CLLocationManager *)manager
didChangeAuthorizationStatus:(CLAuthorizationStatus)status;

    optional func locationManager(_ manager: CLLocationManager,
 didChangeAuthorization status: CLAuthorizationStatus)

rdar://problem/26586048
2016-06-01 14:31:13 -07:00
Jordan Rose
4091e54d67 Add API notes for a few poorly-imported CoreLocation APIs.
rdar://problem/26526454
2016-05-31 12:22:37 -07:00