summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/CodeCompletionStrings.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/CodeCompletionStrings.h')
-rw-r--r--clang-tools-extra/clangd/CodeCompletionStrings.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/clang-tools-extra/clangd/CodeCompletionStrings.h b/clang-tools-extra/clangd/CodeCompletionStrings.h
index fd81db40e76..dac4ba56676 100644
--- a/clang-tools-extra/clangd/CodeCompletionStrings.h
+++ b/clang-tools-extra/clangd/CodeCompletionStrings.h
@@ -45,13 +45,15 @@ getParameterDocComment(const ASTContext &Ctx,
const CodeCompleteConsumer::OverloadCandidate &Result,
unsigned ArgIndex, bool CommentsFromHeaders);
-/// Gets label and insert text for a completion item. For example, for function
-/// `Foo`, this returns <"Foo(int x, int y)", "Foo"> without snippts enabled.
-///
-/// If \p EnableSnippets is true, this will try to use snippet for the insert
-/// text. Otherwise, the insert text will always be plain text.
-void getLabelAndInsertText(const CodeCompletionString &CCS, std::string *Label,
- std::string *InsertText, bool EnableSnippets);
+/// Formats the signature for an item, as a display string and snippet.
+/// e.g. for const_reference std::vector<T>::at(size_type) const, this returns:
+/// *Signature = "(size_type) const"
+/// *Snippet = "(${0:size_type})"
+/// If set, RequiredQualifiers is the text that must be typed before the name.
+/// e.g "Base::" when calling a base class member function that's hidden.
+void getSignature(const CodeCompletionString &CCS, std::string *Signature,
+ std::string *Snippet,
+ std::string *RequiredQualifiers = nullptr);
/// Assembles formatted documentation for a completion result. This includes
/// documentation comments and other relevant information like annotations.
@@ -63,7 +65,7 @@ std::string formatDocumentation(const CodeCompletionString &CCS,
/// Gets detail to be used as the detail field in an LSP completion item. This
/// is usually the return type of a function.
-std::string getDetail(const CodeCompletionString &CCS);
+std::string getReturnType(const CodeCompletionString &CCS);
} // namespace clangd
} // namespace clang
OpenPOWER on IntegriCloud