Merge pull request #82464 from a7medev/feat/full-documentation-in-code-completion

[IDE] Add full documentation to code completion result
This commit is contained in:
Ahmed Elrefaey
2025-09-04 12:06:21 +03:00
committed by GitHub
parent a1d18cfb1e
commit 1bc96857a8
56 changed files with 1426 additions and 281 deletions

View File

@@ -139,9 +139,9 @@ bool SourceKit::CodeCompletion::addCustomCompletions(
ContextFreeNotRecommendedReason::None,
CodeCompletionDiagnosticSeverity::None, /*DiagnosticMessage=*/"");
auto *swiftResult = new (sink.allocator) CodeCompletion::SwiftResult(
*contextFreeResult, SemanticContextKind::Local,
CodeCompletionFlairBit::ExpressionSpecific,
/*NumBytesToErase=*/0, CodeCompletionResultTypeRelation::Unrelated,
*contextFreeResult, /*DeclOrCtx=*/nullptr, SemanticContextKind::Local,
CodeCompletionFlairBit::ExpressionSpecific, /*NumBytesToErase=*/0,
CodeCompletionResultTypeRelation::Unrelated,
ContextualNotRecommendedReason::None);
CompletionBuilder builder(sink, *swiftResult);
@@ -1154,10 +1154,10 @@ Completion *CompletionBuilder::finish() {
contextFreeBase.getKind(),
contextFreeBase.getOpaqueAssociatedKind(), opKind,
contextFreeBase.getMacroRoles(), contextFreeBase.isSystem(),
contextFreeBase.hasAsyncAlternative(),
newCompletionString, contextFreeBase.getModuleName(),
contextFreeBase.hasAsyncAlternative(), newCompletionString,
contextFreeBase.getModuleName(),
contextFreeBase.getBriefDocComment(),
contextFreeBase.getAssociatedUSRs(),
contextFreeBase.getAssociatedUSRs(), contextFreeBase.getSwiftUSR(),
contextFreeBase.getResultType(),
contextFreeBase.getNotRecommendedReason(),
contextFreeBase.getDiagnosticSeverity(),