-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Clang-Tidy: modernize-use-nullptr does not make sense with spaceship operator #53961
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
@llvm/issue-subscribers-c-20 |
@llvm/issue-subscribers-bug |
@llvm/issue-subscribers-clang-tidy |
for the suppression: maybe this check is aliased, did you use |
Yes, I did. It did not help :-( |
but it doesn't warn for
nor for
The latter one is equivalent to the C++20 test for |
…decls in modernize-use-nullptr The check has produced false positives when checking the default implementation of the spaceship operator. The default implementation should be skipped by the check. Modified the existing test so that the check runs into the bug without this fix and add another test case. Fixes llvm#53961. Patch by Jens Massberg. Reviewed By: ilya-biryukov Differential Revision: https://reviews.llvm.org/D138701 (cherry picked from commit db335d0)
…decls in modernize-use-nullptr The check has produced false positives when checking the default implementation of the spaceship operator. The default implementation should be skipped by the check. Modified the existing test so that the check runs into the bug without this fix and add another test case. Fixes llvm#53961. Patch by Jens Massberg. Reviewed By: ilya-biryukov Differential Revision: https://reviews.llvm.org/D138701 (cherry picked from commit db335d0)
…decls in modernize-use-nullptr The check has produced false positives when checking the default implementation of the spaceship operator. The default implementation should be skipped by the check. Modified the existing test so that the check runs into the bug without this fix and add another test case. Fixes llvm#53961. Patch by Jens Massberg. Reviewed By: ilya-biryukov Differential Revision: https://reviews.llvm.org/D138701 (cherry picked from commit db335d0)
…decls in modernize-use-nullptr The check has produced false positives when checking the default implementation of the spaceship operator. The default implementation should be skipped by the check. Modified the existing test so that the check runs into the bug without this fix and add another test case. Fixes llvm#53961. Patch by Jens Massberg. Reviewed By: ilya-biryukov Differential Revision: https://reviews.llvm.org/D138701 (cherry picked from commit db335d0)
Reopening #45580, as the problem was not solved:
https://godbolt.org/z/3hed7vPvM
Command line:
clang-tidy-13 -checks='hicpp-use-nullptr' tidy20.cpp -- -std=c++20
Output:
Also, for strange reasons I cannot escape it with NOLINTNEXTLINE with local clang-tidy-13.
Godbolt's trunk version suppresses warning correctly.
The text was updated successfully, but these errors were encountered: