[clang-tidy] Skip union-like classes in use-equals-default
authorAlexander Shaposhnikov <ashaposhnikov@google.com>
Tue, 6 Sep 2022 20:19:47 +0000 (20:19 +0000)
committerAlexander Shaposhnikov <ashaposhnikov@google.com>
Tue, 6 Sep 2022 20:19:47 +0000 (20:19 +0000)
commit44503482e0af189d3a7fc57b80238ea4151992b9
treeaad810518db5763a4f71a00548cfc7c911e2c693
parentb4257d3bf58c51ff437c99c7b160023f5fffac78
[clang-tidy] Skip union-like classes in use-equals-default

Skip unions/union-like classes since in this case constructors
with empty bodies behave differently in comparison with regular
structs/classes.

Test plan: ninja check-clang-tools

Differential revision: https://reviews.llvm.org/D132713
clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default-copy.cpp
clang-tools-extra/test/clang-tidy/checkers/modernize/use-equals-default.cpp