swift
0f1cf0f1 - [migrator] Filter out diag::wrong_argument_labels for the fixit pass

Commit
7 years ago
[migrator] Filter out diag::wrong_argument_labels for the fixit pass The migrator only applies changes from the APIDiffMigratorPass in the primary file. This means that if a nominal type was renamed, for example, any members users have added in an extension in a separate file won't be visible, because the extension would still have the old name. This can result in 'wrong argument label' errors with fixits to change the argument labels that, when applied by the fixit pass, completely change which function was being called and cause post-migration errors. This patch updates the fixit pass to ignore diag::wrong_argument_labels. diag::extra_argument_labels and diag::missing_argument_labels were already filtered out for other reasons. Resolves rdar://problem/40170377
Author
Nathan Hawes
Committer
Nathan Hawes
Parents
  • include/swift/Migrator
    • File
      FixitFilter.h
  • test/Migrator
    • Inputs
      • File
        API.json
      • File
        Cities.swift
      • File
        rename_cross_file_2.swift
    • File
      rename_cross_file.swift
    • rename_cross_file.swift.expected