The check should bomb out when there are multiple constructors. However, it didn't count template constructors.
Add a negative test case TwoConstructorsTpl and make it pass.
Paths
| Differential D143375
clang-tidy: Count template constructors in modernize-use-default-member-init ClosedPublic Authored by MarcoFalke on Feb 6 2023, 2:00 AM.
Details Summary The check should bomb out when there are multiple constructors. However, it didn't count template constructors. Add a negative test case TwoConstructorsTpl and make it pass.
Diff Detail Event TimelineComment Actions Remove both test cases that pass on current main on Linux, but fail on Windows. Seems unrelated to add/fix them here. This revision is now accepted and ready to land.Mar 5 2023, 7:43 AM Closed by commit rGfa491fefb0f8: clang-tidy: Count template constructors in modernize-use-default-member-init (authored by MarcoFalke). · Explain WhyMar 6 2023, 2:05 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 501858 clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/checkers/modernize/use-default-member-init.cpp
|