@@ -390,7 +390,7 @@ class ContextFreeCodeCompletionResult {
390390 // / StringRefs outlive this result, typically by storing them in the same
391391 // / \c CodeCompletionResultSink as the result itself.
392392 static ContextFreeCodeCompletionResult *createPatternOrBuiltInOperatorResult (
393- llvm::BumpPtrAllocator &Allocator , CodeCompletionResultKind Kind,
393+ CodeCompletionResultSink &Sink , CodeCompletionResultKind Kind,
394394 CodeCompletionString *CompletionString,
395395 CodeCompletionOperatorKind KnownOperatorKind,
396396 NullTerminatedStringRef BriefDocComment,
@@ -405,7 +405,7 @@ class ContextFreeCodeCompletionResult {
405405 // / \p BriefDocComment outlive this result, typically by storing them in
406406 // / the same \c CodeCompletionResultSink as the result itself.
407407 static ContextFreeCodeCompletionResult *
408- createKeywordResult (llvm::BumpPtrAllocator &Allocator ,
408+ createKeywordResult (CodeCompletionResultSink &Sink ,
409409 CodeCompletionKeywordKind Kind,
410410 CodeCompletionString *CompletionString,
411411 NullTerminatedStringRef BriefDocComment,
@@ -417,7 +417,7 @@ class ContextFreeCodeCompletionResult {
417417 // / result, typically by storing them in the same \c CodeCompletionResultSink
418418 // / as the result itself.
419419 static ContextFreeCodeCompletionResult *
420- createLiteralResult (llvm::BumpPtrAllocator &Allocator ,
420+ createLiteralResult (CodeCompletionResultSink &Sink ,
421421 CodeCompletionLiteralKind LiteralKind,
422422 CodeCompletionString *CompletionString,
423423 CodeCompletionResultType ResultType);
@@ -428,7 +428,7 @@ class ContextFreeCodeCompletionResult {
428428 // / \c StringRefs outlive this result, typically by storing them in the same
429429 // / \c CodeCompletionResultSink as the result itself.
430430 static ContextFreeCodeCompletionResult *createDeclResult (
431- llvm::BumpPtrAllocator &Allocator , CodeCompletionString *CompletionString,
431+ CodeCompletionResultSink &Sink , CodeCompletionString *CompletionString,
432432 const Decl *AssociatedDecl, NullTerminatedStringRef ModuleName,
433433 NullTerminatedStringRef BriefDocComment,
434434 ArrayRef<NullTerminatedStringRef> AssociatedUSRs,
@@ -566,6 +566,8 @@ class CodeCompletionResult {
566566 // / information.
567567 // / This computes the type relation between the completion item and its
568568 // / expected type context.
569+ // / See \c CodeCompletionResultType::calculateTypeRelation for documentation
570+ // / on \p USRTypeContext.
569571 // / The \c ContextFree result must outlive this result. Typically, this is
570572 // / done by allocating the two in the same sink or adopting the context free
571573 // / sink in the sink that allocates this result.
@@ -574,6 +576,7 @@ class CodeCompletionResult {
574576 CodeCompletionFlair Flair, uint8_t NumBytesToErase,
575577 const ExpectedTypeContext *TypeContext,
576578 const DeclContext *DC,
579+ const USRBasedTypeContext *USRTypeContext,
577580 ContextualNotRecommendedReason NotRecommended,
578581 CodeCompletionDiagnosticSeverity DiagnosticSeverity,
579582 NullTerminatedStringRef DiagnosticMessage);
0 commit comments