summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/CodeComplete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.cpp')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index f603d1a81ec..02c65757f41 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -729,8 +729,9 @@ public:
// FIXME: for headers, we need to get a comment from the index.
ScoredSignatures.push_back(processOverloadCandidate(
Candidate, *CCS,
- getParameterDocComment(S.getASTContext(), Candidate, CurrentArg,
- /*CommentsFromHeaders=*/false)));
+ Candidate.getFunction()
+ ? getDeclComment(S.getASTContext(), *Candidate.getFunction())
+ : ""));
}
std::sort(ScoredSignatures.begin(), ScoredSignatures.end(),
[](const ScoredSignature &L, const ScoredSignature &R) {
OpenPOWER on IntegriCloud