Clang: Fix detection of unresolved #includes

The diagnostic severity of unresolved includes changed with

  [backported/clang-9][libclang] Fix CXTranslationUnit_KeepGoing
  commit dba0adcfe0 @ https://code.qt.io/clang/clang

from "Fatal" back to "Error".

Adapt to this accordingly.

This fixes

  [  FAILED  ] ClangCodeModelServerSlowTest.UicHeaderAvailableAfterParse
  [  FAILED  ] UpdateAnnotationsJobSlowTest.UpdatesUnresolvedFilePaths

Change-Id: Ica11206437e21e6219736e9851ceb77aecc47efb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-04-25 11:36:13 +02:00
parent f0c64c3bd7
commit 50715e71b9

View File

@@ -44,7 +44,7 @@ static QSet<Utf8String> unresolvedFilePaths(const QVector<DiagnosticContainer> &
QSet<Utf8String> unresolved;
for (const DiagnosticContainer &diagnostic : diagnostics) {
if (diagnostic.severity == DiagnosticSeverity::Fatal
if (diagnostic.severity == DiagnosticSeverity::Error
&& diagnostic.category == Utf8StringLiteral("Lexical or Preprocessor Issue")) {
const QString path = re.match(diagnostic.text).captured(1);
if (!path.isEmpty())