This is an archive of the discontinued LLVM Phabricator instance.

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 Timeline

MarcoFalke created this revision.Feb 6 2023, 2:00 AM
Herald added a project: Restricted Project. · View Herald Transcript
MarcoFalke requested review of this revision.Feb 6 2023, 2:00 AM
MarcoFalke updated this revision to Diff 496094.Feb 9 2023, 5:02 AM

Simplify patch and remove test case failing on Windows, but passing on Linux

MarcoFalke updated this revision to Diff 496104.Feb 9 2023, 6:00 AM
MarcoFalke edited the summary of this revision. (Show Details)

Remove both test cases that pass on current main on Linux, but fail on Windows. Seems unrelated to add/fix them here.

Looks good, thanks! Please document change in the Release Notes.

Thanks. Added release note. Lmk if I should go ahead and merge this.

MarcoFalke updated this revision to Diff 501858.Mar 2 2023, 7:02 AM

mv release note, rebase

carlosgalvezp accepted this revision.Mar 5 2023, 7:43 AM

Thanks for the fix!

This revision is now accepted and ready to land.Mar 5 2023, 7:43 AM