ClangCodeModel: Suppress "Unknown argument" error

Unknown compiler flags are an unsuppressable error in clang.
But we do not want to maintain a blacklist of unsupported GCC and MSVC
options or a whitelist of supported clang options, as both would
constantly go out of date.
As clangd seems to work fine despite the error message, we simply filter
out this type of diagnostic.

Fixes: QTCREATORBUG-27113
Change-Id: Ib32601831eded60daf80eb0ca5cf01bbd71493fa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-02-25 16:37:16 +01:00
parent f8cec0a85a
commit 9735049e2c
10 changed files with 26 additions and 9 deletions

View File

@@ -186,7 +186,7 @@ public:
bool hasDiagnostic(const LanguageServerProtocol::DocumentUri &uri,
const LanguageServerProtocol::Diagnostic &diag) const;
void setDiagnosticsHandlers(const TextMarkCreator &textMarkCreator,
const HideDiagnosticsHandler &hideHandler);
const HideDiagnosticsHandler &hideHandler, const DiagnosticsFilter &filter);
void setSemanticTokensHandler(const SemanticTokensHandler &handler);
void setSymbolStringifier(const LanguageServerProtocol::SymbolStringifier &stringifier);
LanguageServerProtocol::SymbolStringifier symbolStringifier() const;