Some editors use diagnostics from SourceKit to replace build issues. This causes issues if the diagnostics from SourceKit are formatted differently than the build issues. Make sure they are rendered the same way, removing most uses of `DiagnosticsEditorMode`.
To do so, always emit the `add stubs for conformance` note (which previously was only emitted in editor mode) and remove all `; add <something>` suffixes from notes that state which requirements are missing.
rdar://129283608
An @objc protocol can now explicitly declare both the `async` and completion handler signatures of a method as long as the completion handler one is marked with `@available(*, renamed:)`.
This is not yet handled correctly in PrintAsClang.
This really only happens when the ClangImporter imports an ObjC
protocol that has an async-looking method, which yields two
requirements in the protocol. Only one of these requirements
will be witnessed.
fixes rdar://73326224
While a Swift protocol can have its async requirements satisfied
by a sync witness, this is not the case for ObjC protocols because
it is not just a calling convention difference.
Because every async ObjC function requirement in the protocol also
has a sibling that is sync, a sync witness might be trying
to conform to the sync version that takes a completion handler.
Without this change, we were seeing an issue where we would
consider both the async and sync versions of an ObjC requirement,
and accidentially choose the async version when the witness was
sync, and then raise an error about the typechecker's mistake.
Instead of raising an error, this change removes the ability for
the typechecker to even consider the errornous conformance.
resolves rdar://73326234
With 'async' imports of Objective-C protocol requirements, a single
Objective-C method will produce two different requirements in the
protocol, with the same Objective-C selector. Teach the AST verifier
that it is sufficient for just one of the requirements with that
Objective-C selector to be satisfied by a witness.
Fixes rdar://72742910.