@@ -5079,15 +5079,12 @@ namespace {
50795079 bool hasKnownSwiftName, ModuleDecl *module ,
50805080 bool allowObjCMismatchFallback,
50815081 bool cacheResult) {
5082- const auto &languageVersion =
5083- Impl.SwiftContext .LangOpts .EffectiveLanguageVersion ;
5084-
50855082 auto isMatch = [&](const T *singleResult, bool baseNameMatches,
50865083 bool allowObjCMismatch) -> bool {
50875084 const DeclAttributes &attrs = singleResult->getAttrs ();
50885085
50895086 // Skip versioned variants.
5090- if (attrs. isUnavailableInSwiftVersion (languageVersion ))
5087+ if (singleResult-> isUnavailableInCurrentSwiftVersion ( ))
50915088 return false ;
50925089
50935090 // If Clang decl has a custom Swift name, then we know that the name we
@@ -7692,11 +7689,9 @@ void SwiftDeclConverter::importMirroredProtocolMembers(
76927689 if (classImplementsProtocol (superInterface, clangProto, true ))
76937690 continue ;
76947691
7695- const auto &languageVersion =
7696- Impl.SwiftContext .LangOpts .EffectiveLanguageVersion ;
76977692 auto importProtocolRequirement = [&](Decl *member) {
76987693 // Skip compatibility stubs; there's no reason to mirror them.
7699- if (member->getAttrs (). isUnavailableInSwiftVersion (languageVersion ))
7694+ if (member->isUnavailableInCurrentSwiftVersion ( ))
77007695 return ;
77017696
77027697 if (auto prop = dyn_cast<VarDecl>(member)) {
@@ -8002,9 +7997,6 @@ void SwiftDeclConverter::importInheritedConstructors(
80027997 if (curObjCClass->hasDesignatedInitializers ())
80037998 kind = CtorInitializerKind::Convenience;
80047999
8005- const auto &languageVersion =
8006- Impl.SwiftContext .LangOpts .EffectiveLanguageVersion ;
8007-
80088000 auto members = superclassDecl->lookupDirect (
80098001 DeclBaseName::createConstructor ());
80108002
@@ -8014,7 +8006,7 @@ void SwiftDeclConverter::importInheritedConstructors(
80148006 continue ;
80158007
80168008 // Don't inherit compatibility stubs.
8017- if (ctor->getAttrs (). isUnavailableInSwiftVersion (languageVersion ))
8009+ if (ctor->isUnavailableInCurrentSwiftVersion ( ))
80188010 continue ;
80198011
80208012 // Don't inherit (non-convenience) factory initializers.
0 commit comments