forked from qt-creator/qt-creator
clang-tidy: Suppress clang warnings
Those warnings should be printed via the clang code model, which can be fine tuned to (de-)activate warnings. The clang-diagnostic-* warnings from clang-tidy are not shown in the dialog an thus can not be selectivly activated by the user. Change-Id: I80b2cad227a9fd8fa0de253c73c40abfa8076be6 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Björn Schäpers
parent
3e2d224722
commit
8987996500
@@ -58,10 +58,10 @@ static QStringList tidyChecksArguments(const ClangDiagnosticConfig diagnosticCon
|
||||
const ClangDiagnosticConfig::TidyMode tidyMode = diagnosticConfig.clangTidyMode();
|
||||
// The argument "-config={}" stops stating/evaluating the .clang-tidy file.
|
||||
if (tidyMode == ClangDiagnosticConfig::TidyMode::UseDefaultChecks)
|
||||
return {"-config={}"};
|
||||
return {"-config={}", "-checks=-clang-diagnostic-*"};
|
||||
if (tidyMode == ClangDiagnosticConfig::TidyMode::UseCustomChecks)
|
||||
return {"-config={}", "-checks=" + diagnosticConfig.clangTidyChecks()};
|
||||
return {"--warnings-as-errors=-*"};
|
||||
return {"-config={}", "-checks=" + diagnosticConfig.clangTidyChecks() + ",-clang-diagnostic-*"};
|
||||
return {"--warnings-as-errors=-*", "-check=-clang-diagnostic-*"};
|
||||
}
|
||||
|
||||
static QStringList clazyChecksArguments(const ClangDiagnosticConfig diagnosticConfig)
|
||||
|
||||
Reference in New Issue
Block a user