mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[AST] Ignore UnvalidatedDeclsWithOpaqueReturnTypes in skipped functions
This commit is contained in:
@@ -3751,6 +3751,10 @@ void SourceFile::setAvailabilityScope(AvailabilityScope *scope) {
|
||||
|
||||
ArrayRef<OpaqueTypeDecl *> SourceFile::getOpaqueReturnTypeDecls() {
|
||||
for (auto *vd : UnvalidatedDeclsWithOpaqueReturnTypes.takeVector()) {
|
||||
if (vd->getDeclContext()->getInnermostSkippedFunctionContext()) {
|
||||
// Ignore things in skipped functions.
|
||||
continue;
|
||||
}
|
||||
if (auto opaqueDecl = vd->getOpaqueResultTypeDecl()) {
|
||||
auto inserted = ValidatedOpaqueReturnTypes.insert(
|
||||
{opaqueDecl->getOpaqueReturnTypeIdentifier().str(),
|
||||
|
||||
Reference in New Issue
Block a user