forked from qt-creator/qt-creator
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:
@@ -352,6 +352,11 @@ QString toString(const CompleteCodeMessage &)
|
||||
return QLatin1String("CompleteCodeMessage\n");
|
||||
}
|
||||
|
||||
QString toString(const RequestDiagnosticsMessage &)
|
||||
{
|
||||
return QStringLiteral("RequestDiagnosticsMessage\n");
|
||||
}
|
||||
|
||||
class IpcSenderSpy : public IpcSenderInterface
|
||||
{
|
||||
public:
|
||||
@@ -373,6 +378,10 @@ public:
|
||||
void completeCode(const CompleteCodeMessage &message) override
|
||||
{ senderLog.append(toString(message)); }
|
||||
|
||||
void requestDiagnostics(const RequestDiagnosticsMessage &message) override
|
||||
{ senderLog.append(toString(message)); }
|
||||
|
||||
|
||||
public:
|
||||
QString senderLog;
|
||||
};
|
||||
@@ -1105,14 +1114,27 @@ void ClangCodeCompletionTest::testUpdateBackendAfterRestart()
|
||||
LogOutput(
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: myheader.h ProjectPart: \n"
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: myheader.h ProjectPart: \n"
|
||||
"RequestDiagnosticsMessage\n"
|
||||
"RegisterProjectPartsForCodeCompletionMessage\n"
|
||||
" ProjectPartContainer id: qt-widgets-app.pro qt-widgets-app\n"
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: myheader.h ProjectPart: \n"
|
||||
"RequestDiagnosticsMessage\n"
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: myheader.h ProjectPart: \n"
|
||||
"RequestDiagnosticsMessage\n"
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: ui_mainwindow.h ProjectPart: \n"
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: myheader.h ProjectPart: \n"
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: mainwindow.cpp ProjectPart: qt-widgets-app.pro qt-widgets-app\n"
|
||||
"RegisterTranslationUnitForCodeCompletionMessage\n"
|
||||
" Path: mainwindow.cpp ProjectPart: qt-widgets-app.pro qt-widgets-app\n"
|
||||
"RequestDiagnosticsMessage\n"
|
||||
|
||||
)));
|
||||
spy.senderLog.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user