[clang-tidy] Correct union & macros handling in modernize-use-equals-default
authorPiotr Zegar <me@piotrzegar.pl>
Sun, 26 Mar 2023 13:22:43 +0000 (13:22 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Sun, 26 Mar 2023 13:22:44 +0000 (13:22 +0000)
commiteb87e55c9aade5d7b42606487e69b5f3a6da1e65
tree4ccf73c1b8f560a4c3db06b430c0d05d32e94a4e
parent52296f5ed88b20af29cac517e349b221ed84cc2a
[clang-tidy] Correct union & macros handling in modernize-use-equals-default

To this moment this check were ignoring only inline
union special members, From now also out-of-line
special members going to be ignored. Also extended
support for IgnoreMacros to cover also macros used
inside a body, or used preprocesor directives.

Fixes:
 - https://github.com/llvm/llvm-project/issues/28300
 - https://github.com/llvm/llvm-project/issues/40554

Reviewed By: alexander-shaposhnikov

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