[clang-tidy] Ignore cxxRewrittenBinaryOperator in defaulted function decls in moderni...
authorJens Massberg <massberg@google.com>
Fri, 25 Nov 2022 14:29:57 +0000 (15:29 +0100)
committerIlya Biryukov <ibiryukov@google.com>
Fri, 25 Nov 2022 14:45:37 +0000 (15:45 +0100)
commitdb335d02a5e7d98c24f7006e42129856ba1cd695
treebeaf3ca6861f5b610d1e837c7cb0160c5279b5c4
parentd65019bbcb0a33502ebfc3cfc492e4d3cee9c7b7
[clang-tidy] Ignore cxxRewrittenBinaryOperator in defaulted function 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 #53961.

Patch by Jens Massberg.

Reviewed By: ilya-biryukov

Differential Revision: https://reviews.llvm.org/D138701
clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/modernize/use-nullptr-cxx20.cpp