Commit Graph

10 Commits

Author SHA1 Message Date
Saleem Abdulrasool
bdb7901a1c test: modernise nullability attributes (NFC)
Use the modern spelling for the nullability attributes in the test mock
headers.  Currently, this was relying on the predefined macros from
clang to work.  However, those are only available on Darwin targets.
This is needed to make the mock environments more portable.
2017-11-01 23:27:33 -07:00
Jacob Bandes-Storch
89d0d62bd6 [PrintAsObjC] print __attribute__((noescape)) in Obj-C headers (#4438)
https://bugs.swift.org/browse/SR-2406
2016-08-31 09:27:59 -07: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
Chris Willmore
af0c7bd620 Initial implementation of SE-0054 "Abolish IUO Type" (#2322)
This is a squash of the following commits:

* [SE-0054] Import function pointer arg, return types, typedefs as optional

IUOs are only allowed on function decl arguments and return types, so
don't import typedefs or function pointer args or return types as IUO.

* [SE-0054] Only allow IUOs in function arg and result type.

When validating a TypeRepr, raise a diagnostic if an IUO is found
anywhere other thn the top level or as a function parameter or return
tpye.

* [SE-0054] Disable inference of IUOs by default

When considering a constraint of the form '$T1 is convertible to T!',
generate potential bindings 'T' and 'T?' for $T1, but not 'T!'. This
prevents variables without explicit type information from ending up with
IUO type. It also prevents implicit instantiation of functions and types
with IUO type arguments.

* [SE-0054] Remove the -disable-infer-iuos flag.

* Add nonnull annotations to ObjectiveCTests.h in benchmark suite.
2016-05-03 14:06:19 -07:00
Jordan Rose
50df5852c3 [ClangImporter] dispatch_block_t may be nullable or nonnull.
r31634 mistakenly treated all dispatch_block_ts as nonnull, because we've
never had to deal with a mapped typedef that refers to a pointer type.

('SEL' will eventually have the same issue, but for now the Swift
'Selector' type just has nil as an inhabitant.)

rdar://problem/22843921

Swift SVN r32210
2015-09-24 21:57:55 +00:00
Jordan Rose
5619b5dd44 [apinotes] Remove information that has been migrated into the SDKs.
I'll be filing Radars for the rest of these. (Some of them already have them.)

rdar://problem/19003559&19756368&20276854

Swift SVN r29324
2015-06-05 23:02:17 +00:00
Doug Gregor
f919dd5248 __attribute__((noescape)) isn't getting imported properly for methods.
Fixes rdar://problem/19818617.

Swift SVN r25256
2015-02-12 22:53:59 +00:00
Anna Zaks
9e5003e668 API Notes: Mark dispatch_retain and dispatch_release as unavailable.
Swift SVN r22091
2014-09-18 18:51:52 +00:00
Jordan Rose
2b1a092c27 [ClangImporter] Prefer typedef sugar for blocks even in bridge-able contexts.
We'd rather show dispatch_async as

  // new
  func dispatch_async(queue: dispatch_queue_t!, block: dispatch_block_t!)

than

  // old
  func dispatch_async(queue: dispatch_queue_t!, block: (() -> Void)!)

which was only happening because we were trying to hide the @objc_block
annotation when possible. That's not necessary when we have a typealias.

<rdar://problem/16679280>

Swift SVN r17273
2014-05-02 21:36:59 +00:00
Dmitri Hrybenko
d35cf945e6 Move Clang importer test SDK to a toplevel dir test/Inputs where it can be
shared between Clang importer and IDE tests


Swift SVN r11292
2013-12-14 02:20:32 +00:00