[FixCode] When picking-up fixits for migration ignore the fixits for adding @objc(selector).

These interact badly with the swift migrator, they are triggered by label mismatches in pre-migrated code.

We also don't generally need them since we do inference for the most common cases.
This commit is contained in:
Argyrios Kyrtzidis
2016-05-26 17:13:14 -07:00
parent 48a063e853
commit 146be88a6e
3 changed files with 21 additions and 2 deletions

View File

@@ -563,6 +563,11 @@ private:
Info.ID == diag::missing_argument_labels.ID ||
Info.ID == diag::override_argument_name_mismatch.ID)
return false;
// This also interacts badly with the swift migrator, it unnecessary adds
// @objc(selector) attributes triggered by the mismatched label changes.
if (Info.ID == diag::objc_witness_selector_mismatch.ID ||
Info.ID == diag::witness_non_objc.ID)
return false;
if (Kind == DiagnosticKind::Error)
return true;