-
Notifications
You must be signed in to change notification settings - Fork 13.5k
hicpp-use-nullptr does not make sense with spaceship operator #45580
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
Comments
godbolt.org: https://godbolt.org/z/3Ca-Zn |
Looking at the AST it's fairly easy to see why this warning is generated In the defaulted function definition:
In foo(A, A):
Basically part of the spaceship operator comparison expands to
It seems that the 0 is being cast to a member pointer for the comparison which ultimately results in this warning. |
*** Bug llvm/llvm-bugzilla-archive#46636 has been marked as a duplicate of this bug. *** |
*** Bug llvm/llvm-bugzilla-archive#49089 has been marked as a duplicate of this bug. *** |
Should be fixed in 98146c1 |
Thank you! |
mentioned in issue llvm/llvm-bugzilla-archive#46636 |
mentioned in issue llvm/llvm-bugzilla-archive#49089 |
mentioned in issue llvm/llvm-bugzilla-archive#50582 |
Extended Description
Hello
With the following input:
and command line:
Clang-Tidy generates following output which does not make sense:
The text was updated successfully, but these errors were encountered: