@@ -613,6 +613,7 @@ class CodeCompletionResult {
613613 unsigned AssociatedKind : 8 ;
614614 unsigned KnownOperatorKind : 6 ;
615615 unsigned SemanticContext : 3 ;
616+ unsigned IsArgumentLabels : 1 ;
616617 unsigned NotRecommended : 4 ;
617618 unsigned IsSystem : 1 ;
618619
@@ -637,14 +638,15 @@ class CodeCompletionResult {
637638 // /
638639 // / \note The caller must ensure \c CodeCompletionString outlives this result.
639640 CodeCompletionResult (ResultKind Kind, SemanticContextKind SemanticContext,
640- unsigned NumBytesToErase,
641+ bool IsArgumentLabels, unsigned NumBytesToErase,
641642 CodeCompletionString *CompletionString,
642643 ExpectedTypeRelation TypeDistance,
643644 CodeCompletionOperatorKind KnownOperatorKind =
644645 CodeCompletionOperatorKind::None,
645646 StringRef BriefDocComment = StringRef())
646647 : Kind(Kind), KnownOperatorKind(unsigned (KnownOperatorKind)),
647648 SemanticContext (unsigned (SemanticContext)),
649+ IsArgumentLabels(unsigned (IsArgumentLabels)),
648650 NotRecommended(unsigned (NotRecommendedReason::None)),
649651 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
650652 BriefDocComment(BriefDocComment), TypeDistance(TypeDistance) {
@@ -664,12 +666,13 @@ class CodeCompletionResult {
664666 // / \note The caller must ensure \c CodeCompletionString outlives this result.
665667 CodeCompletionResult (CodeCompletionKeywordKind Kind,
666668 SemanticContextKind SemanticContext,
667- unsigned NumBytesToErase,
669+ bool IsArgumentLabels, unsigned NumBytesToErase,
668670 CodeCompletionString *CompletionString,
669671 ExpectedTypeRelation TypeDistance,
670672 StringRef BriefDocComment = StringRef())
671673 : Kind(Keyword), KnownOperatorKind(0 ),
672674 SemanticContext(unsigned (SemanticContext)),
675+ IsArgumentLabels(unsigned (IsArgumentLabels)),
673676 NotRecommended(unsigned (NotRecommendedReason::None)),
674677 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
675678 BriefDocComment(BriefDocComment), TypeDistance(TypeDistance) {
@@ -683,11 +686,12 @@ class CodeCompletionResult {
683686 // / \note The caller must ensure \c CodeCompletionString outlives this result.
684687 CodeCompletionResult (CodeCompletionLiteralKind LiteralKind,
685688 SemanticContextKind SemanticContext,
686- unsigned NumBytesToErase,
689+ bool IsArgumentLabels, unsigned NumBytesToErase,
687690 CodeCompletionString *CompletionString,
688691 ExpectedTypeRelation TypeDistance)
689692 : Kind(Literal), KnownOperatorKind(0 ),
690693 SemanticContext(unsigned (SemanticContext)),
694+ IsArgumentLabels(unsigned (IsArgumentLabels)),
691695 NotRecommended(unsigned (NotRecommendedReason::None)),
692696 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
693697 TypeDistance(TypeDistance) {
@@ -702,7 +706,7 @@ class CodeCompletionResult {
702706 // / arguments outlive this result, typically by storing them in the same
703707 // / \c CodeCompletionResultSink as the result itself.
704708 CodeCompletionResult (SemanticContextKind SemanticContext,
705- unsigned NumBytesToErase,
709+ bool IsArgumentLabels, unsigned NumBytesToErase,
706710 CodeCompletionString *CompletionString,
707711 const Decl *AssociatedDecl, StringRef ModuleName,
708712 CodeCompletionResult::NotRecommendedReason NotRecReason,
@@ -712,6 +716,7 @@ class CodeCompletionResult {
712716 enum ExpectedTypeRelation TypeDistance)
713717 : Kind(ResultKind::Declaration), KnownOperatorKind(0 ),
714718 SemanticContext(unsigned (SemanticContext)),
719+ IsArgumentLabels(unsigned (IsArgumentLabels)),
715720 NotRecommended(unsigned (NotRecReason)),
716721 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
717722 ModuleName(ModuleName), BriefDocComment(BriefDocComment),
@@ -728,9 +733,9 @@ class CodeCompletionResult {
728733 getOperatorKind () != CodeCompletionOperatorKind::None);
729734 }
730735
731- // FIXME:
736+ // Used by deserialization.
732737 CodeCompletionResult (SemanticContextKind SemanticContext,
733- unsigned NumBytesToErase,
738+ bool IsArgumentLabels, unsigned NumBytesToErase,
734739 CodeCompletionString *CompletionString,
735740 CodeCompletionDeclKind DeclKind, bool IsSystem,
736741 StringRef ModuleName,
@@ -743,6 +748,7 @@ class CodeCompletionResult {
743748 : Kind(ResultKind::Declaration),
744749 KnownOperatorKind(unsigned (KnownOperatorKind)),
745750 SemanticContext(unsigned (SemanticContext)),
751+ IsArgumentLabels(unsigned (IsArgumentLabels)),
746752 NotRecommended(unsigned (NotRecReason)), IsSystem(IsSystem),
747753 NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
748754 ModuleName(ModuleName), BriefDocComment(BriefDocComment),
@@ -805,6 +811,10 @@ class CodeCompletionResult {
805811 return static_cast <SemanticContextKind>(SemanticContext);
806812 }
807813
814+ bool isArgumentLabels () const {
815+ return static_cast <bool >(IsArgumentLabels);
816+ }
817+
808818 bool isNotRecommended () const {
809819 return getNotRecommendedReason () != NotRecommendedReason::None;
810820 }
0 commit comments