14#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETIONSTRINGS_H
15#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETIONSTRINGS_H
17#include "clang/Sema/CodeCompleteConsumer.h"
32 const CodeCompletionResult &Result,
33 bool CommentsFromHeaders);
36std::string
getDeclComment(
const ASTContext &Ctx,
const NamedDecl &D);
54 CodeCompletionResult::ResultKind ResultKind,
55 CXCursorKind CursorKind,
bool IncludeFunctionArguments =
true,
56 std::string *RequiredQualifiers =
nullptr);
64 llvm::StringRef DocComment);
std::string formatDocumentation(const CodeCompletionString &CCS, llvm::StringRef DocComment)
Assembles formatted documentation for a completion result.
std::string getDeclComment(const ASTContext &Ctx, const NamedDecl &Decl)
Similar to getDocComment, but returns the comment for a NamedDecl.
std::string getReturnType(const CodeCompletionString &CCS)
Gets detail to be used as the detail field in an LSP completion item.
void getSignature(const CodeCompletionString &CCS, std::string *Signature, std::string *Snippet, CodeCompletionResult::ResultKind ResultKind, CXCursorKind CursorKind, bool IncludeFunctionArguments, std::string *RequiredQualifiers)
Formats the signature for an item, as a display string and snippet.
std::string getDocComment(const ASTContext &Ctx, const CodeCompletionResult &Result, bool CommentsFromHeaders)
Gets a minimally formatted documentation comment of Result, with comment markers stripped.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//