This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] misc-unused-parameters - retain old behavior under StrictMode
ClosedPublic

Authored by alexfh on May 16 2018, 8:30 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

alexfh created this revision.May 16 2018, 8:30 AM
lebedev.ri accepted this revision.Jun 27 2018, 8:07 AM
lebedev.ri added a subscriber: lebedev.ri.

I would like to see some test in non-strict mode that shows that
it is the child existence is what matters, e.g. with empty lines,
and maybe another one with all the content commented out /**/.

Otherwise this looks good.

clang-tidy/misc/UnusedParametersCheck.cpp
180 ↗(On Diff #147100)

So this checks that there are children.

This revision is now accepted and ready to land.Jun 27 2018, 8:07 AM
aaron.ballman accepted this revision.Jun 27 2018, 9:04 AM
aaron.ballman added a subscriber: aaron.ballman.

LGTM aside from some documentation nits.

docs/clang-tidy/checks/misc-unused-parameters.rst
6 ↗(On Diff #147100)

may signal about a bug -> may signify a bug

42 ↗(On Diff #147100)

to hide in -> to hide

alexfh updated this revision to Diff 153327.Jun 28 2018, 8:17 AM
alexfh marked 3 inline comments as done.
  • Addressed review comments.
alexfh added inline comments.Jun 28 2018, 8:17 AM
clang-tidy/misc/UnusedParametersCheck.cpp
180 ↗(On Diff #147100)

Yes, and llvm::distance (recently renamed to llvm::size) doesn't work here any more, so the code now checks for iterator equality, which should be easier to read.

This revision was automatically updated to reflect the committed changes.