Clean up fix-it generation for missing cases, esp. with '@unknown'

- Combine the common logic for editor mode and non-editor mode.
- Do a better job minimizing fix-its.
- If '@unknown' is the only missing case, put `fatalError()` in the
  Xcode placeholder, since that's what the compiler would have done.
This commit is contained in:
Jordan Rose
2018-04-05 16:34:41 -07:00
parent bdb8388721
commit ceb51eea80
8 changed files with 1068 additions and 109 deletions

View File

@@ -130,6 +130,7 @@ struct FixitFilter {
Info.ID == diag::objc_inference_swift3_objc_derived.ID ||
Info.ID == diag::missing_several_cases.ID ||
Info.ID == diag::missing_particular_case.ID ||
Info.ID == diag::missing_unknown_case.ID ||
Info.ID == diag::paren_void_probably_void.ID ||
Info.ID == diag::make_decl_objc.ID ||
Info.ID == diag::optional_req_nonobjc_near_match_add_objc.ID)