This is an archive of the discontinued LLVM Phabricator instance.

Add more examples to clang tidy checkers
ClosedPublic

Authored by sylvestre.ledru on Apr 9 2017, 6:19 AM.

Diff Detail

Event Timeline

sylvestre.ledru created this revision.Apr 9 2017, 6:19 AM
alexfh accepted this revision.Apr 10 2017, 12:58 PM

Thanks!

LG with a couple of nits.

docs/clang-tidy/checks/misc-inefficient-algorithm.rst
25

std::count

docs/clang-tidy/checks/misc-unused-parameters.rst
25

The example seems incomplete?

This revision is now accepted and ready to land.Apr 10 2017, 12:58 PM

Another couple of post-commit comments.

docs/clang-tidy/checks/misc-unused-parameters.rst
15

nit: two spaces before the comment.

docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst
11

nit: I'd add a bit more context, namely the definition of P.

docs/clang-tidy/checks/misc-unused-parameters.rst
15

I believe it is the case ?
I stole this from the unit test test/clang-tidy/misc-unused-parameters.c

docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst
11

done in r299961

alexfh added inline comments.Apr 13 2017, 9:34 AM
docs/clang-tidy/checks/misc-unused-parameters.rst
15

Indeed. But now we have -format-style= option to fix formatting after applying fixes ;). Since it's not on by default, it's fair to leave the example as is.