Commit Graph

9 Commits

Author SHA1 Message Date
Jeff Kelley
41a8227f8b Recommend type(of:) instead of .dynamicType 2016-09-25 22:53:03 -04:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00
Doug Gregor
0e40128d1a [Clang importer] Use Clang swift_bridge attribute for bridging.
When an Objective-C class type is annotated with the swift_bridge
value type, bridge it to the named type. Use API notes on Foundation
rather than special cases.

For Objective-C classes where bridging was baked into the Clang
importer (NSString, NSArray, NSDictionary, NSSet), add API notes to
put the appropriate swift_bridge attribute on these Objective-C
classes.

Note: requires Clang update.
2016-03-10 23:10:28 -08:00
Doug Gregor
c1cc39accc [Clang importer] Rely on Clang's mapping of API notes to attributes directly.
Rather than managing API notes directly in the Clang importer, tell
Clang where to find the API notes files and let it map them directly
to attributes. Then, use the existing attribute-mapping
mechanisms---with minor extensions for cases where Clang previously
didn't map some Swift-specific API notes---to get at that information.

There is a minor regression where we can no longer apply API notes to
declarations that don't have a specific Clang declaration. The
specific example (NSError's inherited init()) comes from
rdar://problem/21042412; we've regressed here, but the correct fix is
(and has always been) on the Objective-C side
(rdar://problem/19977891).

Finishes rdar://problem/24447420.
2016-02-18 16:48:02 -08:00
Anna Zaks
9064df226a [apinotes] Add fresh API audit drop.
Here, we mark the null_resettable properties as explicit "U".
Fixed UIColor and NSColor's initWithCGColor as returning an optional (radar://18420272)
Fixed fontDescriptorWithSymbolicTraits (rdar://problem/18812268)
Contains audit for NSXMLParserDelegate (rdar://problem/18227344)
+ a few other newly audited APIs

Swift SVN r23698
2014-12-05 00:16:08 +00:00
Anna Zaks
505257ae9b API Notes: This contains audit for most of AppKit!
Plus, smaller enhancements on the other frameworks.
Removes the need for _PrintableNSObjectType hack (rdar://problem/16883288)

Swift SVN r22185
2014-09-22 21:47:22 +00:00
Anna Zaks
3997db5349 API Notes: Commit API Notes v13 (with copyWithZone returning N)
This drop adds 3 new frameworks: Metal, SceneKit, and SpriteKit.
The other frameworks (Foundation, CoreData, ObjectiveC, UIKit) have been refined:
 - conflicting items went to unknowns,
 - bugs got fixed,
 - more auditing has been performed.

Swift SVN r21443
2014-08-25 20:31:21 +00:00
Anna Zaks
fa6c359842 API Notes File: Add notes fro Objective C framework
Note that isEqual: has been audited to take an optional parameter.

Swift SVN r21317
2014-08-20 21:15:25 +00:00
Doug Gregor
d347e93993 API notes: Add a CMake option to build the compiled API notes files from YAML sources.
Introduce a new off-by-default CMake option, SWIFT_BUILD_API_NOTES,
which compiles the YAML sources for API notes into the binary form
installed alongside the overlays. This will be the default mode,
replacing KnownObjCMethods.def, shortly.

The new apinotes/ subdirectory contains the translated contents of
KnownObjCMethods.def, courtesy of Anna. It still requires some
revision.

Swift SVN r20370
2014-07-23 04:23:51 +00:00