@@ -414,6 +414,9 @@ enum class CodeCompletionFlairBit: uint8_t {
414414
415415 // / E.g. override func foo() { super.foo() ...
416416 SuperChain = 1 << 1 ,
417+
418+ // / Argument label and type. i.e. 'label: <#Ty#>'.
419+ ArgumentLabels = 1 << 2 ,
417420};
418421
419422using CodeCompletionFlair = OptionSet<CodeCompletionFlairBit>;
@@ -600,7 +603,6 @@ class CodeCompletionResult {
600603 unsigned KnownOperatorKind : 6 ;
601604 unsigned SemanticContext : 3 ;
602605 unsigned Flair: 8 ;
603- unsigned IsArgumentLabels : 1 ;
604606 unsigned NotRecommended : 4 ;
605607 unsigned IsSystem : 1 ;
606608
@@ -625,16 +627,14 @@ class CodeCompletionResult {
625627 // /
626628 // / \note The caller must ensure \c CodeCompletionString outlives this result.
627629 CodeCompletionResult (ResultKind Kind, SemanticContextKind SemanticContext,
628- CodeCompletionFlair Flair,
629- bool IsArgumentLabels, unsigned NumBytesToErase,
630+ CodeCompletionFlair Flair, unsigned NumBytesToErase,
630631 CodeCompletionString *CompletionString,
631632 ExpectedTypeRelation TypeDistance,
632633 CodeCompletionOperatorKind KnownOperatorKind =
633634 CodeCompletionOperatorKind::None,
634635 StringRef BriefDocComment = StringRef())
635636 : Kind(Kind), KnownOperatorKind(unsigned (KnownOperatorKind)),
636637 SemanticContext (unsigned (SemanticContext)), Flair(unsigned (Flair.toRaw())),
637- IsArgumentLabels(unsigned (IsArgumentLabels)),
638638 NotRecommended(unsigned (NotRecommendedReason::None)),
639639 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
640640 BriefDocComment(BriefDocComment), TypeDistance(TypeDistance) {
@@ -655,13 +655,12 @@ class CodeCompletionResult {
655655 CodeCompletionResult (CodeCompletionKeywordKind Kind,
656656 SemanticContextKind SemanticContext,
657657 CodeCompletionFlair Flair,
658- bool IsArgumentLabels, unsigned NumBytesToErase,
658+ unsigned NumBytesToErase,
659659 CodeCompletionString *CompletionString,
660660 ExpectedTypeRelation TypeDistance,
661661 StringRef BriefDocComment = StringRef())
662662 : Kind(Keyword), KnownOperatorKind(0 ),
663663 SemanticContext(unsigned (SemanticContext)), Flair(unsigned (Flair.toRaw())),
664- IsArgumentLabels(unsigned (IsArgumentLabels)),
665664 NotRecommended(unsigned (NotRecommendedReason::None)),
666665 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
667666 BriefDocComment(BriefDocComment), TypeDistance(TypeDistance) {
@@ -675,13 +674,11 @@ class CodeCompletionResult {
675674 // / \note The caller must ensure \c CodeCompletionString outlives this result.
676675 CodeCompletionResult (CodeCompletionLiteralKind LiteralKind,
677676 SemanticContextKind SemanticContext,
678- CodeCompletionFlair Flair,
679- bool IsArgumentLabels, unsigned NumBytesToErase,
677+ CodeCompletionFlair Flair, unsigned NumBytesToErase,
680678 CodeCompletionString *CompletionString,
681679 ExpectedTypeRelation TypeDistance)
682680 : Kind(Literal), KnownOperatorKind(0 ),
683681 SemanticContext(unsigned (SemanticContext)), Flair(unsigned (Flair.toRaw())),
684- IsArgumentLabels(unsigned (IsArgumentLabels)),
685682 NotRecommended(unsigned (NotRecommendedReason::None)),
686683 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
687684 TypeDistance(TypeDistance) {
@@ -696,8 +693,7 @@ class CodeCompletionResult {
696693 // / arguments outlive this result, typically by storing them in the same
697694 // / \c CodeCompletionResultSink as the result itself.
698695 CodeCompletionResult (SemanticContextKind SemanticContext,
699- CodeCompletionFlair Flair,
700- bool IsArgumentLabels, unsigned NumBytesToErase,
696+ CodeCompletionFlair Flair, unsigned NumBytesToErase,
701697 CodeCompletionString *CompletionString,
702698 const Decl *AssociatedDecl, StringRef ModuleName,
703699 CodeCompletionResult::NotRecommendedReason NotRecReason,
@@ -707,7 +703,6 @@ class CodeCompletionResult {
707703 enum ExpectedTypeRelation TypeDistance)
708704 : Kind(ResultKind::Declaration), KnownOperatorKind(0 ),
709705 SemanticContext(unsigned (SemanticContext)), Flair(unsigned (Flair.toRaw())),
710- IsArgumentLabels(unsigned (IsArgumentLabels)),
711706 NotRecommended(unsigned (NotRecReason)),
712707 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
713708 ModuleName(ModuleName), BriefDocComment(BriefDocComment),
@@ -726,8 +721,7 @@ class CodeCompletionResult {
726721
727722 // Used by deserialization.
728723 CodeCompletionResult (SemanticContextKind SemanticContext,
729- CodeCompletionFlair Flair,
730- bool IsArgumentLabels, unsigned NumBytesToErase,
724+ CodeCompletionFlair Flair, unsigned NumBytesToErase,
731725 CodeCompletionString *CompletionString,
732726 CodeCompletionDeclKind DeclKind, bool IsSystem,
733727 StringRef ModuleName,
@@ -740,7 +734,6 @@ class CodeCompletionResult {
740734 : Kind(ResultKind::Declaration),
741735 KnownOperatorKind(unsigned (KnownOperatorKind)),
742736 SemanticContext(unsigned (SemanticContext)), Flair(unsigned (Flair.toRaw())),
743- IsArgumentLabels(unsigned (IsArgumentLabels)),
744737 NotRecommended(unsigned (NotRecReason)), IsSystem(IsSystem),
745738 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
746739 ModuleName(ModuleName), BriefDocComment(BriefDocComment),
@@ -807,10 +800,6 @@ class CodeCompletionResult {
807800 return static_cast <CodeCompletionFlair>(Flair);
808801 }
809802
810- bool isArgumentLabels () const {
811- return static_cast <bool >(IsArgumentLabels);
812- }
813-
814803 bool isNotRecommended () const {
815804 return getNotRecommendedReason () != NotRecommendedReason::None;
816805 }
0 commit comments