forked from qt-creator/qt-creator
ClangCodeModel: Use clangd for completion and function hint
Change-Id: I80160f3a40da18ac178682afe6caba5e5af6e3eb Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTextDocument;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace TextEditor { class AssistInterface; }
|
||||
|
||||
namespace ClangCodeModel {
|
||||
@@ -42,6 +46,8 @@ public:
|
||||
ClangCompletionContextAnalyzer() = delete;
|
||||
ClangCompletionContextAnalyzer(const ClangCompletionAssistInterface *assistInterface,
|
||||
CPlusPlus::LanguageFeatures languageFeatures);
|
||||
ClangCompletionContextAnalyzer(QTextDocument *document, int position, bool isFunctionHint,
|
||||
CPlusPlus::LanguageFeatures languageFeatures);
|
||||
void analyze();
|
||||
|
||||
enum CompletionAction {
|
||||
@@ -75,8 +81,10 @@ private:
|
||||
void handleFunctionCall(int endOfOperator);
|
||||
|
||||
private:
|
||||
const ClangCompletionAssistInterface *m_interface; // Not owned
|
||||
const CPlusPlus::LanguageFeatures m_languageFeatures; // TODO: Get from assistInterface?!
|
||||
QTextDocument * const m_document;
|
||||
const int m_position;
|
||||
const bool m_isFunctionHint;
|
||||
const CPlusPlus::LanguageFeatures m_languageFeatures;
|
||||
|
||||
// Results
|
||||
CompletionAction m_completionAction = PassThroughToLibClang;
|
||||
|
||||
Reference in New Issue
Block a user