Skip to content

Commit f3191c8

Browse files
committed
[AST] Ignore UnvalidatedDeclsWithOpaqueReturnTypes in skipped functions
1 parent a2e40d6 commit f3191c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/AST/Module.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3751,6 +3751,10 @@ void SourceFile::setAvailabilityScope(AvailabilityScope *scope) {
37513751

37523752
ArrayRef<OpaqueTypeDecl *> SourceFile::getOpaqueReturnTypeDecls() {
37533753
for (auto *vd : UnvalidatedDeclsWithOpaqueReturnTypes.takeVector()) {
3754+
if (vd->getDeclContext()->getInnermostSkippedFunctionContext()) {
3755+
// Ignore things in skipped functions.
3756+
continue;
3757+
}
37543758
if (auto opaqueDecl = vd->getOpaqueResultTypeDecl()) {
37553759
auto inserted = ValidatedOpaqueReturnTypes.insert(
37563760
{opaqueDecl->getOpaqueReturnTypeIdentifier().str(),

0 commit comments

Comments
 (0)