Commit Graph

5 Commits

Author SHA1 Message Date
Jordan Rose
abaf05f1b4 [test] Update APINotes tests for Swift 3 removal
For the most part, this moves 3/4 tests to 4/5 tests. There are
some interesting changes here because API notes for 4 also apply
to 3 unless otherwise specified, and 4.2 is the next version after
4 rather than 5, but everything should still be correct and testing
useful stuff.
2018-07-12 15:44:10 -07:00
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
Doug Gregor
609f9b5a84 [Clang importer] When importing a property as accessors, use accessor types.
When importing a property as accessor methods (rather than as a
property), we were still importing the type of the accessor methods as
if they were Swift getters and setters of a property, which
(necessarily) homogenizes the types. The homogenization is unnecessary
when importing as accessor methods, because the methods are
independent, so just import the accessor method types as if the
property did not exist. This is particularly useful for maintaining
Swift 3 source compatibility for cases where Swift 4 turns a
getter/setter pair into a null_resettable property.

Fixes rdar://problem/30075571.
2017-01-18 10:02:57 -08:00
Doug Gregor
7c81c36742 [API Notes] Add tests for API notes that change types of Clang declarations.
Testing for rdar://problem/28943642.
2016-11-11 23:16:18 -08:00
Jordan Rose
7659012401 [ClangImporter] Respect SwiftImportAsAccessors in APINotes. (#5728)
Swift side of this new flag. This allows Objective-C framework authors
to replace a pair of methods by properties without breaking source
compatibility. This is especially important for class properties,
which were only introduced last year.

Still to come: importing the accessors even when this flag isn't set,
in order to provide better QoI when migrating from a method interface
to a property interface.

Part of rdar://problem/28455962
2016-11-11 17:32:07 -08:00