[clang-tidy] Fix checks filter with warnings-as-errors
authorPiotr Zegar <me@piotrzegar.pl>
Sat, 22 Jul 2023 19:28:25 +0000 (19:28 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Sat, 22 Jul 2023 19:31:51 +0000 (19:31 +0000)
commit9644368f974a095472832bbf9cd475ef5c2c307f
tree5f853a8807a8721919756b1b4a6c0b4dad2fa507
parent5b5b75bfd4d469d56db7980c578214c26288faa9
[clang-tidy] Fix checks filter with warnings-as-errors

Since commit 5d12b13b0b26bc58b02ee23c369da8b83240cceb, warnings are
internally classified as errors which skip the check filters.

One use-case is particularly affected: you cannot selectively disable
clang-analyzer-core checks, they are force-enabled because required by others.
So enabling warning as errors will show new (and unwanted) errors !

Co-authored-by: kiwixz <kiwixz@outlook.com>
Fixes: #61969

Reviewed By: carlosgalvezp

Differential Revision: https://reviews.llvm.org/D146520
clang-tools-extra/clang-tidy/ClangTidy.cpp
clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/infrastructure/warnings-as-errors-diagnostics.cpp