Commit Graph

13 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
Doug Gregor
e82e7d5fbd [Clang importer] Map swift_objc_members attribute found on superclasses.
Fixes rdar://problem/33514802.
2017-07-25 16:18:31 -07:00
Jordan Rose
14b979c035 [test] Remove -verify-ignore-unknown from tests that no longer need it. (#8547) 2017-04-05 09:23:05 -07:00
Doug Gregor
62b4d9bfa9 [SE-0160] Only enable Objective-C parts of the test when _runtime(_ObjC). 2017-04-03 12:41:22 -07:00
Doug Gregor
57c607e339 [SE-0160] Map Clang's swift_objc_members attribute to @objcMembers.
This finishes the implementation of SE-0160, tracked by SR-4481 /
rdar://problem/28497874.
2017-04-03 11:48:55 -07:00
Rintaro Ishizaki
384ab780e9 [Diagnostic verifier] Make '<unknown>' check optional
Added frontend option '-verify-ignore-unknown'
2017-02-02 10:49:32 +09:00
Rintaro Ishizaki
827c6e7c3d [Diagnostic verifier] Diagnostics at '<unknown>:0' are unexpected 2017-02-02 10:48:54 +09:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Doug Gregor
580a2812a3 [Clang importer] Enable API notes alongside header/frameworks.
Enable newly-introduced Clang functionality to load API notes stored
alongside the headers for a module or, for a framework, in an APINotes
subdirectory within the framework. Fixes rdar://problem/28455644.
2016-09-28 00:13:16 -07:00
Doug Gregor
55a3f5398c [Clang importer] Import Swift 2 "stubs" to improve errors in "Swift 2" code.
When attempting to compile Swift 2 code (or any Swift code using the
Swift 2 names) in Swift 3, the compiler diagnostics are often entirely
useless because the names have changed radically enough that one
generally gets "no member named 'foo'" errors rather than a helpful
"'foo' was renamed to 'bar'" error. This makes for a very poor user
experience when (e.g.) trying to move Swift 2 code forward to Swift 3.

To improve the experience, when the Swift 2 and Swift 3 names of an
API differ, the Clang importer will produce a "stub" declaration that
matches the Swift 2 API. That stub will be marked with a synthesized
attribute

  @available(unavailable, renamed: "the-swift-3-name")

that enables better diagnostics (e.g., "'foo' is unavailable: renamed
to 'bar') along with Fix-Its (courtesy of @jrose-apple's recent work)
that fix the Swift 2 code to compile in Swift 3.

This change addresses much of rdar://problem/25309323 (concerning QoI
of Swift 2 code compiled with a Swift 3 compiler), but some cleanup
remains.
2016-05-06 21:12:20 -07:00
Doug Gregor
c9fa65097e [API Notes] Test SwiftPrivate API notes.
*Clang update required*

Test that rdar://problem/25872038 works for Swift.
2016-04-21 23:37:18 -07:00
Doug Gregor
1899882942 [API Notes] Test API notes for tags and typedefs.
Verifies the Clang-side change for rdar://problem/25365464.

**Clang update required**
2016-03-30 23:37:58 -07:00
Doug Gregor
88d73faba8 [API Notes] Test use of API notes to change the Swift name of an entity.
*Note*: requires Clang update, which adds support for SwiftName.
2016-02-20 22:03:38 -08:00