forked from qt-creator/qt-creator
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:
@@ -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())
|
||||
|
Reference in New Issue
Block a user