-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang-tidy] LLVM 16 will promote suppressed warnings to errors when C++20 is enabled #61969
Comments
@llvm/issue-subscribers-c-20 |
@EugeneZelenko can you tag this clang-tidy? |
@llvm/issue-subscribers-clang-tidy |
Handling of warnings as errors is working exactly as expected - all warnings are enabled as errors since you use The real problem is that on C++20, |
Issue with C++20 most probably is related to https://discourse.llvm.org/t/rfc-expand-modular-headers-ppcallbacks-problem-in-c-20/71628 |
Looks like 9644368 is a partial fix, it fixes handling of --warnings-as-errors. Other workaround is here: https://reviews.llvm.org/D156024 |
Fix issue preventing suppression of compiler warnings with -Wno-<warning> under C++20 and above. Add call to ProcessWarningOptions and propagate DiagnosticOpts more properly. Fixes: #56709, #61969 Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D156056
In that mode, the Bazel suppression of a Clang warning doesn't actually suppress the clang-tidy check. Neither does disabling the check in a `.clang-tidy` config file. Instead, disable it directly on the command line when running `clang-tidy`. The clang-tidy bug is: llvm/llvm-project#61969 This is harmless for other versions as this check is not useful with most Bazel configurations, and can be achieved with a compiler warning if truly needed. Fixes erenon#29
In that mode, the Bazel suppression of a Clang warning doesn't actually suppress the clang-tidy check. Neither does disabling the check in a `.clang-tidy` config file. Instead, disable it directly on the command line when running `clang-tidy`. The clang-tidy bug is: llvm/llvm-project#61969 This is harmless for other versions as this check is not useful with most Bazel configurations, and can be achieved with a compiler warning if truly needed. Fixes #29
Repro:
I see that there are other similar issues, but none of them mentions C++20:
#61520, #59588, and #59589
Will the fix proposed in https://reviews.llvm.org/D146520 also work here? Or is this something else?
The text was updated successfully, but these errors were encountered: