Commit 1ecadd7d authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

Clang: Filter out "#include_next in primary source file" warning for headers



Another diagnostic that can't be turned off.

Change-Id: I1e4452ccbb2f1864e1a68cf02a858d410cd0c162
Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
parent 295b11d0
......@@ -134,10 +134,12 @@ static void appendDiagnostic(const CXDiagnostic &diag,
static bool isBlackListedDiagnostic(const Utils::MimeType &mimeType, const QString &diagnostic)
{
static QString pragmaOnceInMainFile = QLatin1String("#pragma once in main file");
static const QStringList blackList {
QLatin1String("#pragma once in main file"),
QLatin1String("#include_next in primary source file")
};
return diagnostic == pragmaOnceInMainFile
&& mimeType.inherits(QLatin1String("text/x-chdr"));
return mimeType.inherits(QLatin1String("text/x-chdr")) && blackList.contains(diagnostic);
}
QList<Diagnostic> SemanticMarker::diagnostics() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment