This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Simplify unused RAII check
ClosedPublic

Authored by steveire on Feb 21 2021, 6:27 AM.

Details

Summary

Fix handling of default construction where the constructor has a default arg.

Diff Detail

Event Timeline

steveire created this revision.Feb 21 2021, 6:27 AM
steveire requested review of this revision.Feb 21 2021, 6:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2021, 6:27 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
njames93 added inline comments.Feb 21 2021, 6:46 AM
clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp
49–53

Its not obvious from the code, but this should work if there are multiple default args. Can that behaviour be demonstrated?

njames93 accepted this revision.Feb 28 2021, 5:13 PM

LG, with 1 nit.

clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp
81–82

Is this necessary?

This revision is now accepted and ready to land.Feb 28 2021, 5:13 PM
This revision was landed with ongoing or failed builds.Mar 2 2021, 1:37 PM
This revision was automatically updated to reflect the committed changes.