@@ -656,8 +656,7 @@ static void addKeyword(CodeCompletionResultSink &Sink, StringRef Name,
656656}
657657
658658static void addDeclKeywords (CodeCompletionResultSink &Sink, DeclContext *DC,
659- bool IsConcurrencyEnabled,
660- bool IsDistributedEnabled) {
659+ bool IsConcurrencyEnabled) {
661660 auto isTypeDeclIntroducer = [](CodeCompletionKeywordKind Kind,
662661 Optional<DeclAttrKind> DAK) -> bool {
663662 switch (Kind) {
@@ -778,11 +777,6 @@ static void addDeclKeywords(CodeCompletionResultSink &Sink, DeclContext *DC,
778777 DeclAttribute::isConcurrencyOnly (*DAK))
779778 return ;
780779
781- // Remove keywords only available when distributed is enabled.
782- if (DAK.hasValue () && !IsDistributedEnabled &&
783- DeclAttribute::isDistributedOnly (*DAK))
784- return ;
785-
786780 addKeyword (Sink, Name, Kind, /* TypeAnnotation=*/ " " , getFlair (Kind, DAK));
787781 };
788782
@@ -943,8 +937,7 @@ void CodeCompletionCallbacksImpl::addKeywords(CodeCompletionResultSink &Sink,
943937 }
944938 case CompletionKind::StmtOrExpr:
945939 addDeclKeywords (Sink, CurDeclContext,
946- Context.LangOpts .EnableExperimentalConcurrency ,
947- Context.LangOpts .EnableExperimentalDistributed );
940+ Context.LangOpts .EnableExperimentalConcurrency );
948941 addStmtKeywords (Sink, CurDeclContext, MaybeFuncBody);
949942 LLVM_FALLTHROUGH;
950943 case CompletionKind::ReturnStmtExpr:
@@ -1013,8 +1006,7 @@ void CodeCompletionCallbacksImpl::addKeywords(CodeCompletionResultSink &Sink,
10131006 }) != ParsedKeywords.end ();
10141007 if (!HasDeclIntroducer) {
10151008 addDeclKeywords (Sink, CurDeclContext,
1016- Context.LangOpts .EnableExperimentalConcurrency ,
1017- Context.LangOpts .EnableExperimentalDistributed );
1009+ Context.LangOpts .EnableExperimentalConcurrency );
10181010 addLetVarKeywords (Sink);
10191011 }
10201012 break ;
@@ -1758,8 +1750,7 @@ void CodeCompletionCallbacksImpl::doneParsing() {
17581750 if (CurDeclContext->isTypeContext ()) {
17591751 // Override completion (CompletionKind::NominalMemberBeginning).
17601752 addDeclKeywords (Sink, CurDeclContext,
1761- Context.LangOpts .EnableExperimentalConcurrency ,
1762- Context.LangOpts .EnableExperimentalDistributed );
1753+ Context.LangOpts .EnableExperimentalConcurrency );
17631754 addLetVarKeywords (Sink);
17641755 SmallVector<StringRef, 0 > ParsedKeywords;
17651756 CompletionOverrideLookup OverrideLookup (Sink, Context, CurDeclContext,
@@ -1768,8 +1759,7 @@ void CodeCompletionCallbacksImpl::doneParsing() {
17681759 } else {
17691760 // Global completion (CompletionKind::PostfixExprBeginning).
17701761 addDeclKeywords (Sink, CurDeclContext,
1771- Context.LangOpts .EnableExperimentalConcurrency ,
1772- Context.LangOpts .EnableExperimentalDistributed );
1762+ Context.LangOpts .EnableExperimentalConcurrency );
17731763 addStmtKeywords (Sink, CurDeclContext, MaybeFuncBody);
17741764 addSuperKeyword (Sink, CurDeclContext);
17751765 addLetVarKeywords (Sink);
0 commit comments