Xi Ge
fedf531b2a
migrator/test: remove -swift-version=3 flag from the test.
2018-07-23 16:09:07 -07:00
Xi Ge
c23d1a89a4
migrator: ensure we update unresolved member access correctly to global names. rdar://41658300
2018-06-29 17:29:53 -07:00
Xi Ge
859d918a78
Re-apply "[migrator] migrator: avoid inserting base name while renaming
...
if users' member access doesn't specify the base name. rdar://40373279"
Previously, we saw that unconditionally omitting type names can lead to
build errors (rdar://40458118). This revised fix omits type names only when
the new member name is identical to the old one.
2018-06-19 12:46:02 -07:00
Huon Wilson
250eb97af0
[test] Avoid defining symbols in headers.
...
This is incorrect, and also breaks TBD validation.
2018-05-23 15:39:21 +10:00
Xi Ge
343d84ba35
migrator: handle argument renames when a global function is hoisted to a static member function. rdar://40145590
2018-05-14 11:33:25 -07:00
Ben Langmuir
1bceacf7b8
[migrator] Handle simple renames for TypeDecl
...
Previously we only handle VarDecl, but it ought to work for types as
well.
2018-05-08 14:32:15 -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
Rintaro Ishizaki
ec3a3df023
[Migrator] Use RewriteBuffer::InsertText() for applying insertion
...
Apparently, ReplaceText() on the same location replaces the replaced
text. Using InsertText() fixes the problem.
rdar://problem/39518867
2018-04-26 19:40:38 +09:00
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
David Farler
e55191f7d5
[Migrator] Don't take redundant replacements during AST Passes
...
We already had this functionality in the FixitApplyDiagnosticConsumer,
but we also need it in the AST passes because different entries in the
API diff data may drive identical fix-its, namely a general type rename,
which can occur anywhere a DeclRef appears, but also for function overrides'
parameter type changes, which are context specific.
rdar://problem/32431533
2017-06-14 14:21:51 -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
55843a29be
migrator: compare sub-kind when checking if two diff items are equivalent to avoid dropping information. rdar://32431567
2017-06-01 18:03:23 -07:00
Xi Ge
0b8b0207e6
migrator: teach the tool to handle qualified replacement. rdar://32466196
2017-06-01 13:15:12 -07:00
Xi Ge
c7b4e36476
[migrator] Handle renaming from explicit argument label to empty argument label at call sites. rdar://32241559 ( #9873 )
2017-05-23 11:34:05 -07:00
Xi Ge
14781598cb
[Migrator] Handle getter/setter to property access migration. rdar://31766311 ( #9083 )
2017-04-27 16:33:57 -07:00
Xi Ge
539cba9479
[Migrator] Handle enum modernization changes. ( #9077 )
2017-04-27 14:08:31 -07:00
Xi Ge
4e224c8b3c
[Test] Move test/migrator to test/Migrator. NFC
2017-04-27 12:26:27 -06:00