Commit Graph

7 Commits

Author SHA1 Message Date
David Farler
789bd3749f [Migrator] Use toLowercaseWord to lowercase SetterToProperty changes
Post-commit review follow-up:
This works better for properties that were all-caps, such as `URL`.

Thanks @harlanhaskins for the tip!

rdar://problem/32845968
2017-06-26 12:53:15 -07:00
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
Xi Ge
9f456b19a3 migrator: use the right method to get the location of return type. rdar://32545812
TypeLoc::getLoc() is not necessarily the start location of the type repr.
2017-06-02 15:17:24 -07:00
Xi Ge
fa78d9259e migrator/test: move all API diff data files to Inputs directory. NFC (#10074) 2017-06-02 14:20:35 -07:00
Xi Ge
1019396663 [migrator] Handle getter function to property change in function overrides. (#9844)
We used to only migrate them in call sites, e.g. changing from
``p.getHeight()`` to ``p.Height``. However, with experimenting on more real-world
projects, we realize migrating overrides is equally important.

rdar://32265583
2017-05-22 16:11:53 -07:00
David Farler
bf52ff032a [Migrator] Conservative and Minimal @objc inference workflows
Based on recommendations in SE-0160, there are two migration workflows:

- Conservative: Maintain @objc visibility that was inferred in Swift 3
  by adding @objc to all declarations that were implicitily visible to
  the Objective-C runtime. This is invoked in the migrator by adding the
  -migrate-keep-objc-visibility flag.
- Minimal: Only declarations that must be visible to Objective-C based
  on their uses (or in cases like dynamic vars) are migrated.

rdar://problem/31876357
2017-04-28 18:28:34 -07:00
Xi Ge
14781598cb [Migrator] Handle getter/setter to property access migration. rdar://31766311 (#9083) 2017-04-27 16:33:57 -07:00