Clang: Add diagnostics

Diagnostics are now moved to the clang backend process. Fixits are
supported too.

Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2015-08-31 16:28:26 +02:00
parent 8dfa9a5dab
commit b278dc87ca
84 changed files with 3633 additions and 132 deletions

View File

@@ -34,6 +34,7 @@
#include "cmbechomessage.h"
#include "projectpartsdonotexistmessage.h"
#include "translationunitdoesnotexistmessage.h"
#include "diagnosticschangedmessage.h"
#include <QDebug>
#include <QVariant>
@@ -48,6 +49,7 @@ void IpcClientInterface::dispatch(const QVariant &message)
static const int codeCompletedMessageType = QMetaType::type("ClangBackEnd::CodeCompletedMessage");
static const int translationUnitDoesNotExistMessage = QMetaType::type("ClangBackEnd::TranslationUnitDoesNotExistMessage");
static const int projectPartsDoNotExistMessage = QMetaType::type("ClangBackEnd::ProjectPartsDoNotExistMessage");
static const int diagnosticsChangedMessage = QMetaType::type("ClangBackEnd::DiagnosticsChangedMessage");
int type = message.userType();
@@ -61,6 +63,8 @@ void IpcClientInterface::dispatch(const QVariant &message)
translationUnitDoesNotExist(message.value<TranslationUnitDoesNotExistMessage>());
else if (type == projectPartsDoNotExistMessage)
projectPartsDoNotExist(message.value<ProjectPartsDoNotExistMessage>());
else if (type == diagnosticsChangedMessage)
diagnosticsChanged(message.value<DiagnosticsChangedMessage>());
else
qWarning() << "Unknown IpcClientMessage";
}