Commit Graph

2 Commits

Author SHA1 Message Date
Allan Shortlidge
c06b35c3d0 Sema: Avoid crashing in diagnoseDeclAsyncAvailability() when call expr cannot be determined.
The `call` argument to `diagnoseDeclAsyncAvailability()` may be `nullptr` when the structure of the AST prevents `getEnclosingApplyExpr()` from finding the enclosing apply. The diagnostics implementation introduced with https://github.com/apple/swift/pull/60663 needs to tollerate this, similar to the rest of `diagnoseDeclAsyncAvailability()`.

Resolves rdar://100862513
2022-10-06 17:16:46 -07:00
Ben Barham
3de83aca66 [ClangImporter] Add @completionHandlerAsync for imported decls
Implicitly add the @completionHandlerAsync attribute for ObjCMethodDecl
that have a completion handler. Adds a link from the non-async to the
async function for use in diagnostics and refactorings.

Resolves rdar://74665226
2021-03-31 08:39:12 +10:00