Merge pull request #77537 from hamishknight/complete-func

[Completion] Type-check parent closures for local functions
This commit is contained in:
Hamish Knight
2024-11-12 10:40:53 +00:00
committed by GitHub
12 changed files with 123 additions and 49 deletions

View File

@@ -515,12 +515,12 @@ public:
const_cast<DeclContext *>(this)->getInnermostSkippedFunctionContext();
}
/// Returns the innermost context that is a ClosureExpr, which defines how
/// self behaves, unless within a type context that redefines self.
/// Returns the innermost ClosureExpr context that can propagate its captures
/// to this DeclContext.
LLVM_READONLY
ClosureExpr *getInnermostClosureForSelfCapture();
const ClosureExpr *getInnermostClosureForSelfCapture() const {
return const_cast<DeclContext *>(this)->getInnermostClosureForSelfCapture();
ClosureExpr *getInnermostClosureForCaptures();
const ClosureExpr *getInnermostClosureForCaptures() const {
return const_cast<DeclContext *>(this)->getInnermostClosureForCaptures();
}
/// Returns the semantic parent of this context. A context has a