-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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 18: Generated C++ spaceship operator triggers clang-tidy warning #93409
Comments
No, check need to be fixed. |
Of course, this would also be okay. I just thought it would be better to fix the root cause and not the resulting symptom. |
@llvm/issue-subscribers-c-20 Author: None (pkl97)
This program triggers a readability-implicit-bool-conversion clang-tidy warning:
```c++
#include <compare>
#include <list>
struct X struct Y int main()
The clang-tidy command used: clang-tidy --checks=-*,readability-implicit-bool-conversion main.cpp It is somewhat unfortunate that a generated function triggers such a warning. Of course one can add NOLINT() statements to all affected operators but that unnecessarily clutters the code and makes it harder to read. Is it possible to alter the generated code and avoid this warning? |
…onversion Ignore implicit declarations and defaulted functions. Helps with issues in generated code like, C++ spaceship operator. Closes llvm#93409
…onversion (llvm#94512) Ignore implicit declarations and defaulted functions. Helps with issues in generated code like, C++ spaceship operator. Closes llvm#93409 Signed-off-by: Hafidz Muzakky <ais.muzakky@gmail.com>
This program triggers a readability-implicit-bool-conversion clang-tidy warning:
The warning emitted is the following:
The clang-tidy command used:
clang-tidy --checks=-*,readability-implicit-bool-conversion main.cpp
It is somewhat unfortunate that a generated function triggers such a warning. Of course one can add NOLINT() statements to all affected operators but that unnecessarily clutters the code and makes it harder to read.
Is it possible to alter the generated code and avoid this warning?
The text was updated successfully, but these errors were encountered: