diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -405,8 +405,9 @@ if (C.IndexResult) { SetDoc(C.IndexResult->Documentation); } else if (C.SemaResult) { - SetDoc(getDocComment(*ASTCtx, *C.SemaResult, - /*CommentsFromHeader=*/false)); + const auto docComment = getDocComment(*ASTCtx, *C.SemaResult, + /*CommentsFromHeader=*/false); + SetDoc(formatDocumentation(*SemaCCS, docComment)); } } }