alexfh added a comment. Please rebase the patch and add full context to the diffs (see http://llvm.org/docs/Phabricator.html).
================ Comment at: docs/clang-tidy/checks/misc-inefficient-algorithm.rst:4 @@ -5,1 +3,3 @@ +.. meta:: + :http-equiv=refresh: 5;URL=performance-inefficient-algorithm.html ---------------- alexfh wrote: > We need to change the add_new_check.py script to exclude obsolete check names > from the list (it could exclude all files marked `:orphan:`). Tell me, if you > need help with this. No need to do this, since the script already implements an alternative solution. ================ Comment at: docs/clang-tidy/checks/performance-inefficient-algorithm.rst:3 @@ -2,3 +2,3 @@ -misc-inefficient-algorithm +performance-inefficient-algorithm ========================== ---------------- xazax.hun wrote: > Eugene.Zelenko wrote: > > alexfh wrote: > > > After reading this check name a few times, I found it too generic (one > > > may think that this is a generic algorithm-level code profiler ;). I > > > think, we need to rename it to `performance-inefficient-lookup-algorithm` > > > or `performance-inefficient-search-algorithm`, since we're changing the > > > name anyway. > > I think will be better to keep generic name, since other algorithms could > > be added later. > That is an interesting question whether it is better to have more general > check names and make checkers do more stuff or have more specific names and > split functionality between more checks. It would be awesome to have a policy > on that. A good benchmark whether two checks should be implemented by the > same checker is to think about whether there are cases when the user might > enable only one of the checks, not both. > A good benchmark whether two checks should be implemented by the same checker > is to think about whether there are cases when the user might enable only one > of the checks, not both. In this case the check detects one consistent set of patterns (non-member lookup algorithms used on containers that implement better alternatives). I don't think we'll want to add something unrelated to this check, so I'd better make the name more specific and create another check, when we have a different set of patterns. http://reviews.llvm.org/D16248 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits