Commit Graph

21 Commits

Author SHA1 Message Date
Xi Ge
72e7f9a7d7 [test] Add some tests for swift-api-digester's data generation for complex type changes. (#8917) 2017-04-21 15:15:45 -07:00
Xi Ge
a644ab33a0 swift-api-digester: fix recently found false positives. (#8899)
* swift-api-digester: ensure constructors are detected as removed if not moved. rdar://31694119

* swift-api-digester: types with the same printed name are considered behavior-preserving. rdar://31694085

* [test] Using tmp directory from build.
2017-04-20 18:34:52 -07:00
Xi Ge
b089bab40e swift-api-digester: avoid reporting moved constructors. rdar://31694119 (#8885)
They don't make more sense than renamed decls.
2017-04-20 12:48:17 -07:00
Xi Ge
ba33fd6236 swift-api-digester: Add a data structure APIDiffItemStore. (#8794)
This structure serves multiple purposes:
	a. Allow migrator to speak in the same language with swift-api-digester in terms of API changes.
	b. Serialize/Deserialize detected API change items in JSON format.
	c. Manage memory after deserializing API change items.
	d. Facilitate look up by USRs of APIs under migration.
The structure is tested by round-trip serialization and deserialization.
2017-04-17 13:04:02 -07:00
Xi Ge
8b26dd000f swift-api-digester: Various improvements for migrator script generation. (#8745)
* swift-api-digester: Add a test for generating migrator script.

* swift-api-digester: Add #ifndef guard before each macro category.

* swift-api-digester: Avoid printing macro categories with empty content.

* swift-api-digester: Add test for multiple type changes in a single decl.

* swift-api-digester: simplify some code. NFC
2017-04-13 15:02:04 -07:00
Xi Ge
7ccef06aa8 Swift-api-digester: check self-parameter explicitly instead of using its context. NFC (#8660) 2017-04-10 13:53:48 -07:00
Xi Ge
f4e478e93f swift-api-digester: use 0-based parameter index. rdar://30763215 2017-03-02 16:48:19 -08:00
Erik Eckstein
7995d3d35a SourceKit: Use new mangling for USR generation. 2017-02-23 12:47:10 -08:00
Xi Ge
2db243723a swift-api-digester: fix a crash when an SDKNode matches a null node. rdar://29312301 2016-11-17 11:28:19 -08:00
Xi Ge
368247604f swift-api-digester: consider name alias type as a standalone node kind. (#5701)
* swift-api-digester: consider name alias type as a standalone node kind.

* [test] Update the swift-api-digester dump for stdlib to honor new name alias node.
2016-11-09 16:44:27 -08:00
Xi Ge
327759c148 swift-sdk-digester: simplify change descriptions to allow empty expected output. 2016-11-01 13:54:35 -07:00
Xi Ge
725aef7ed3 swift-api-digester: reference ownership changes considered source-breaking. 2016-10-31 13:33:07 -07:00
Xi Ge
4475b07613 swift-api-digester: teach the tool to keep track of ownership attributes. 2016-10-27 11:55:24 -07:00
Xi Ge
a0678c349c swift-api-digester: allow function types to be matched with other types. 2016-10-25 22:21:42 -07:00
Xi Ge
ad3a9f276b [swift-api-digester] Detect static decls become non-static and also the other way around. 2016-10-24 17:13:34 -07:00
Xi Ge
b8ee47c80b [sdk-api-digester] Record whether a value decl is static.
Changing a static member to a non-static one, or the other way around,
can be source-breaking.
2016-10-21 14:08:39 -07:00
Xi Ge
87d22acb67 [swift-api-digester] Ensure we exclude decls of low accessibility from the API comparison. (#5382) 2016-10-20 12:02:37 -07:00
Xi Ge
647f65ea21 swift-api-digester: teach the tool to output constructors' parameter type changes. (#5351) 2016-10-18 13:03:21 -07:00
Xi Ge
edea59722e api-digester: teach the tool to detect new mutating/throwing functions (#5284) 2016-10-13 21:04:39 -07:00
Xi Ge
55f194b3ef api-digester: in module dump, record whether a func decl is mutating. 2016-10-13 11:57:42 -07:00
Xi Ge
ab9b035dbc [test] api-digester: add a test to ensure the dumped module content is expected. 2016-10-13 11:53:07 -07:00