Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/ClangImporter/SwiftDeclSynthesizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "swift/AST/ParameterList.h"
#include "swift/AST/Pattern.h"
#include "swift/AST/Stmt.h"
#include "swift/AST/TypeCheckRequests.h"
#include "swift/Basic/Assertions.h"
#include "clang/AST/Mangle.h"
#include "clang/Sema/DelayedDiagnostic.h"
Expand Down Expand Up @@ -2532,6 +2533,11 @@ SwiftDeclSynthesizer::makeDefaultArgument(const clang::ParmVarDecl *param,
funcDecl->setAccess(AccessLevel::Public);
funcDecl->getAttrs().add(new (ctx)
AlwaysEmitIntoClientAttr(/*IsImplicit=*/true));
// At this point, the parameter/return types of funcDecl might not be imported
// into Swift completely, meaning that their protocol conformances might not
// be populated yet. Prevent LifetimeDependenceInfoRequest from prematurely
// populating the conformance table for the types involved.
ctx.evaluator.cacheOutput(LifetimeDependenceInfoRequest{funcDecl}, {});

ImporterImpl.defaultArgGenerators[param] = funcDecl;

Expand Down