Clang: Add clazy argument to ignore included files

ignore-include-files flag  does not improve performance
currently. But if we decide to use -I for some of our
include paths than this parameter will continue to skip
them for clazy diagnostics.

Change-Id: I8ff02edf224f680f88f1b178098787c0e2a629cb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-01-18 09:44:54 +01:00
parent 0837f974da
commit bb782f64ba

View File

@@ -579,6 +579,11 @@ static QStringList clazyCommandLine()
QStringList result;
addXclangArg(result, "-add-plugin", "clang-lazy");
addXclangArg(result, "-plugin-arg-clang-lazy", clazyChecks);
// NOTE: we already use -isystem for all include paths to make libclang skip diagnostics for
// all of them. That means that ignore-included-files will not change anything unless we decide
// to return the original -I prefix for some include paths.
addXclangArg(result, "-plugin-arg-clang-lazy", "ignore-included-files");
return result;
}