@@ -613,6 +613,7 @@ class CodeCompletionResult {
613
613
unsigned AssociatedKind : 8 ;
614
614
unsigned KnownOperatorKind : 6 ;
615
615
unsigned SemanticContext : 3 ;
616
+ unsigned IsArgumentLabels : 1 ;
616
617
unsigned NotRecommended : 4 ;
617
618
unsigned IsSystem : 1 ;
618
619
@@ -637,14 +638,15 @@ class CodeCompletionResult {
637
638
// /
638
639
// / \note The caller must ensure \c CodeCompletionString outlives this result.
639
640
CodeCompletionResult (ResultKind Kind, SemanticContextKind SemanticContext,
640
- unsigned NumBytesToErase,
641
+ bool IsArgumentLabels, unsigned NumBytesToErase,
641
642
CodeCompletionString *CompletionString,
642
643
ExpectedTypeRelation TypeDistance,
643
644
CodeCompletionOperatorKind KnownOperatorKind =
644
645
CodeCompletionOperatorKind::None,
645
646
StringRef BriefDocComment = StringRef())
646
647
: Kind(Kind), KnownOperatorKind(unsigned (KnownOperatorKind)),
647
648
SemanticContext (unsigned (SemanticContext)),
649
+ IsArgumentLabels(unsigned (IsArgumentLabels)),
648
650
NotRecommended(unsigned (NotRecommendedReason::None)),
649
651
NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
650
652
BriefDocComment(BriefDocComment), TypeDistance(TypeDistance) {
@@ -664,12 +666,13 @@ class CodeCompletionResult {
664
666
// / \note The caller must ensure \c CodeCompletionString outlives this result.
665
667
CodeCompletionResult (CodeCompletionKeywordKind Kind,
666
668
SemanticContextKind SemanticContext,
667
- unsigned NumBytesToErase,
669
+ bool IsArgumentLabels, unsigned NumBytesToErase,
668
670
CodeCompletionString *CompletionString,
669
671
ExpectedTypeRelation TypeDistance,
670
672
StringRef BriefDocComment = StringRef())
671
673
: Kind(Keyword), KnownOperatorKind(0 ),
672
674
SemanticContext(unsigned (SemanticContext)),
675
+ IsArgumentLabels(unsigned (IsArgumentLabels)),
673
676
NotRecommended(unsigned (NotRecommendedReason::None)),
674
677
NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
675
678
BriefDocComment(BriefDocComment), TypeDistance(TypeDistance) {
@@ -683,11 +686,12 @@ class CodeCompletionResult {
683
686
// / \note The caller must ensure \c CodeCompletionString outlives this result.
684
687
CodeCompletionResult (CodeCompletionLiteralKind LiteralKind,
685
688
SemanticContextKind SemanticContext,
686
- unsigned NumBytesToErase,
689
+ bool IsArgumentLabels, unsigned NumBytesToErase,
687
690
CodeCompletionString *CompletionString,
688
691
ExpectedTypeRelation TypeDistance)
689
692
: Kind(Literal), KnownOperatorKind(0 ),
690
693
SemanticContext(unsigned (SemanticContext)),
694
+ IsArgumentLabels(unsigned (IsArgumentLabels)),
691
695
NotRecommended(unsigned (NotRecommendedReason::None)),
692
696
NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
693
697
TypeDistance(TypeDistance) {
@@ -702,7 +706,7 @@ class CodeCompletionResult {
702
706
// / arguments outlive this result, typically by storing them in the same
703
707
// / \c CodeCompletionResultSink as the result itself.
704
708
CodeCompletionResult (SemanticContextKind SemanticContext,
705
- unsigned NumBytesToErase,
709
+ bool IsArgumentLabels, unsigned NumBytesToErase,
706
710
CodeCompletionString *CompletionString,
707
711
const Decl *AssociatedDecl, StringRef ModuleName,
708
712
CodeCompletionResult::NotRecommendedReason NotRecReason,
@@ -712,6 +716,7 @@ class CodeCompletionResult {
712
716
enum ExpectedTypeRelation TypeDistance)
713
717
: Kind(ResultKind::Declaration), KnownOperatorKind(0 ),
714
718
SemanticContext(unsigned (SemanticContext)),
719
+ IsArgumentLabels(unsigned (IsArgumentLabels)),
715
720
NotRecommended(unsigned (NotRecReason)),
716
721
NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
717
722
ModuleName(ModuleName), BriefDocComment(BriefDocComment),
@@ -728,9 +733,9 @@ class CodeCompletionResult {
728
733
getOperatorKind () != CodeCompletionOperatorKind::None);
729
734
}
730
735
731
- // FIXME:
736
+ // Used by deserialization.
732
737
CodeCompletionResult (SemanticContextKind SemanticContext,
733
- unsigned NumBytesToErase,
738
+ bool IsArgumentLabels, unsigned NumBytesToErase,
734
739
CodeCompletionString *CompletionString,
735
740
CodeCompletionDeclKind DeclKind, bool IsSystem,
736
741
StringRef ModuleName,
@@ -743,6 +748,7 @@ class CodeCompletionResult {
743
748
: Kind(ResultKind::Declaration),
744
749
KnownOperatorKind(unsigned (KnownOperatorKind)),
745
750
SemanticContext(unsigned (SemanticContext)),
751
+ IsArgumentLabels(unsigned (IsArgumentLabels)),
746
752
NotRecommended(unsigned (NotRecReason)), IsSystem(IsSystem),
747
753
NumBytesToErase(NumBytesToErase), CompletionString(CompletionString),
748
754
ModuleName(ModuleName), BriefDocComment(BriefDocComment),
@@ -805,6 +811,10 @@ class CodeCompletionResult {
805
811
return static_cast <SemanticContextKind>(SemanticContext);
806
812
}
807
813
814
+ bool isArgumentLabels () const {
815
+ return static_cast <bool >(IsArgumentLabels);
816
+ }
817
+
808
818
bool isNotRecommended () const {
809
819
return getNotRecommendedReason () != NotRecommendedReason::None;
810
820
}
0 commit comments