Commit Graph

145 Commits

Author SHA1 Message Date
Xi Ge
2152d0bde0 swift-api-digester: remove some dead code. NFC 2018-08-16 16:22:53 -07:00
Xi Ge
11cdd41bf0 swift-api-digester: simplify some code. NFC. 2018-08-16 13:16:57 -07:00
Xi Ge
07e002ce5e swift-api-digester: diagnose generic signature change for any declarations. 2018-08-16 11:32:43 -07:00
Xi Ge
17b9a4edf9 swift-api-digester: diagnose the addition and removal of @objc, @_fixed_layout and @_frozen under ABI mode. 2018-08-15 17:49:01 -07:00
Xi Ge
2ac57cf948 swift-api-digester: add a flag to diagnostics indicating whether it's abi-specific. 2018-08-15 12:02:22 -07:00
Xi Ge
45f9e4437d swift-api-digester: add a new flag to indicate whether the tool is checking ABI stability. (#18707)
When this flag turns on, all type nodes and generic signatures are canonicalized.
2018-08-14 14:10:59 -07:00
Xi Ge
5ea6eae2a3 swift-api-digester: include generic signature printing in the module dump. (#18686) 2018-08-14 08:01:23 -07:00
Xi Ge
3121af26e1 swift-api-digester: keep track of all decl attribute kinds in module dump. (#18473)
The tool should use decl attribute kinds from AST rather than defining
its own list of attributes. Thus we can keep track of all attributes kinds
rather than the selected ones.
2018-08-02 13:39:32 -07:00
Slava Pestov
5213f80e7e IDE: Remove uses of AbstractFunctionDecl::getParameterLists() 2018-07-22 20:56:56 -07:00
Xi Ge
b78c9eb328 swift-api-digester: ensure the sdk-dump includes extensions from types of other modules. rdar://42266041 2018-07-20 17:26:22 -07:00
Xi Ge
c9746452ac swift-api-digester: avoid diagnosing reference ownership changes from unowned to weak. rdar://41260522 2018-07-09 11:21:45 -07:00
John McCall
34b0cbc11d Merge pull request #16237 from davezarzycki/metaprogram_ref_storage_types
[AST] NFC: Enable reference storage type meta-programming
2018-07-05 14:45:38 -04:00
David Zarzycki
b91bde4d14 [swift-api-digester] NFC: Adopt reference storage type meta-programming macros 2018-06-30 06:44:34 -04:00
Xi Ge
967beefffc swift-api-digester: teach the tool to detect member variables change to global ones. rdar://41658300 2018-06-29 16:33:22 -07:00
Xi Ge
42127d9f68 swift-api-digester: emit the diff items for changing from RawRepresentable struct to a type alias of raw type.
related: rdar://39498127
2018-06-15 11:55:09 -07:00
Xi Ge
7312fea3b2 migrator: emit error messages when migration scripts are missing.
We used to assert migration scripts exist. This patch further
decouples these scripts and the compiler by treating missing scripts
as a regular compiler error.

Related: rdar://40538097
2018-05-25 11:25:32 -07:00
Xi Ge
b0084558a2 swift-api-digester: specify raw types when detecting the reversion of NS_TYPED_EXTENSIBLE_ENUM. 2018-05-24 13:01:21 -07:00
Xi Ge
82ca0a1891 swift-api-digester: detect type alias of raw types change to RawRepresentableStructs.
Related to: rdar://40076487
2018-05-23 12:23:47 -07:00
Xi Ge
5212311cc0 swift-api-digester: sort migration scripts before serializing them. 2018-05-22 13:39:46 -07:00
Xi Ge
b9517110f2 swift-api-digester: print raw type names for raw representable API changes. 2018-05-16 17:16:41 -07:00
Xi Ge
d962656eed swift-api-digester: lessen some assertions. 2018-05-11 17:23:12 -07:00
Xi Ge
1556d62bce swift-api-digester: we should further detect if the declared type of a hoisted variable has been changed. rdar://40076924 2018-05-09 13:42:20 -07:00
Xi Ge
18f6c9c435 swift-api-digester: add an action to dump USRs for all decls in a header.
We need this for custom migration like rdar://39992329.
2018-05-04 17:19:24 -07:00
Xi Ge
82a2c2c644 migrator: ignore migration scripts with underscored new names. rdar://39877447
Updating something to underscored names is hardly correct. This patch
disallows picking up such migration scripts.
2018-05-01 16:06:06 -07:00
David Zarzycki
95473a10d7 [Misc] NFC: Fix random build warnings
Unused variables/methods, language extensions, extra semicolons, intentional
self assignment, platform specific quirks, etc.
2018-04-30 12:52:43 -04:00
Xi Ge
9b8cd0dc15 swift-api-digester: detect API changes due to undoing NS_TYPED_EXTENSIBLE_ENUM. rdar://39498127 2018-04-20 16:48:14 -07:00
Xi Ge
53c9f1aaa9 swift-api-digester: add a new action to dump name correction template.
Rename detection in the tool may not reflect overlay additions; thus we
mistakes a new name to be an underscored one. This new action searches
migration scripts for suspicious ones and generates a template for us to
specify the correct names.
2018-04-19 18:01:01 -07:00
Xi Ge
e405bab9bf swift-api-digester: separate migration kind from the other node annotation kind. NFC 2018-04-09 16:18:24 -07:00
Xi Ge
e15c197823 swift-api-digester: detect simple parameter/return type update from String to StringRepresentableStruct. 2018-04-08 13:24:12 -07:00
Xi Ge
3e00fda3e0 swift-api-digester: teach the tool to detect [String] changes to [StringRepresentable]. 2018-04-07 10:55:41 -07:00
Xi Ge
cd87f4142d swift-api-digester: add specific logic to detect optional dictionary's key changes.
We've also seen type changes in the frameworks from "[String: Any]?" to
"[StringRepresentable: Any]?". This patch adds specific logic and
attribute for this kind of change on the top of nonnull dictionary
changes.
2018-04-06 16:43:56 -07:00
Xi Ge
9042db57b2 swift-api-digester: ignore synthesized type members from conformed clang protocols. 2018-04-06 12:42:30 -07:00
Xi Ge
4705e0790c swift-api-digester: rename SDK nodes internally. NFC 2018-04-05 15:55:41 -07:00
Xi Ge
72f49e2351 swift-api-digester: separate internal and external names for node kinds. NFC 2018-04-05 15:38:17 -07:00
Xi Ge
1163c33cfc swift-api-digester: minor refactoring. NFC 2018-04-05 14:58:04 -07:00
Xi Ge
cb53468c5f swift-api-digester: refine diagnostic messages for removed type alias.
Framework authors can use SwiftWraper:none to bring back string enums
to type alias of String. When diagnosing source breaking changes, these
type alias are shown as removed. Therefore, it's hard to tell whether these
changes are automatically migratable. This patch refines the
removed-type-alias by further analyzing whether a
RawRepresentable with the same usr appeared in the later version of
SDK. If there is, another kind of message is emitted for differentiation.
2018-04-04 21:10:10 -07:00
Xi Ge
6ffad8085b swift-api-digester: if a removed declaration has been hoisted to a type member,
show this declaration as renamed instead of removed.
2018-04-03 13:26:30 -07:00
Xi Ge
784116a79b swift-api-digester: simplify some code. NFC 2018-03-26 15:46:32 -07:00
Xi Ge
b2c437525c swift-api-digester: teach the tool to detect [String:Any] changes to [StringRepresentable:Any].
This allows us to migrate string enum changes from the frameworks.
2018-03-26 15:35:07 -07:00
Doug Gregor
b2b69e8abf Rename BoundNameAliasType to NameAliasType.
NameAliasType is dead! Long live NameAliasType!
2018-03-25 21:35:17 -07:00
Doug Gregor
c43f96a855 [AST] Remove now-unused NameAliasType. 2018-03-25 21:35:16 -07:00
Xi Ge
20a48e5adb swift-api-digester: teach the tool to serialize USRs for nominal type. (#15463)
This allows us to map back from a type to the declaration in the dump,
so that we can perform more fine-grained analysis like whether a string
has been changed to string enum.
2018-03-23 16:29:54 -07:00
Doug Gregor
253bd10bd3 Cope with BoundNameAliasType in more places that handle NameAliasType. 2018-03-21 23:49:33 -07:00
Slava Pestov
30dae65226 AST: Add DeclBaseName::Kind::Constructor
Not used yet.
2018-03-16 00:25:54 -07:00
Jordan Rose
c26f40b45b Fix some more misuses of LLVM's YAML parser. (#15119)
https://reviews.llvm.org/D44317 should prevent this from happening
again.
2018-03-10 17:47:14 -08:00
Xi Ge
f66dd8e59c swift-api-digester: keep track of type declarations with fixed layout. (#14991)
We need special logic to check abi-stability for decls with fixed
layout.
2018-03-05 15:08:06 -08:00
Xi Ge
f77b318831 swift-api-digester: teach the tool to serialize raw type name for enum declarations. 2018-03-02 17:14:36 -08:00
Huon Wilson
78bdc95ce3 Merge pull request #14874 from huonw/at-owned-cleanup
Various refactorings for __owned.
2018-03-02 14:20:21 -08:00
Huon Wilson
b94c5364f5 [NFC] Rename 'Ownership' to 'ReferenceOwnership'.
There's really two forms of ownership: references and values. Renaming
to make way for better distinguishing of the two.
2018-03-02 11:38:28 -08:00
Xi Ge
66bb9ce4ba swift-api-digester: teach the tool to serialize conforming protocols. (#14923) 2018-03-01 15:57:59 -08:00