[PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 06:54:01 PST 2016


alexfh added inline comments.

================
Comment at: clang-tidy/misc/MiscTidyModule.cpp:58
@@ -57,3 +56,1 @@
-    CheckFactories.registerCheck<InefficientAlgorithmCheck>(
-        "misc-inefficient-algorithm");
     CheckFactories.registerCheck<MacroParenthesesCheck>(
----------------
aaron.ballman wrote:
> This will break projects that enable the misc-inefficient-algorithm check (which clang 3.7 exposed). Is there a reason to not keep this check registered under this name?
> 
> (Perhaps a follow-up patch to allow deprecation of check names so that users are given guidance would make sense.)
I don't feel strongly, but I'm somewhat reluctant to keep old check names. With every new clang-tidy version someone starts using on a project, they need to carefully look at the list of checks and select relevant ones anyway. I think, adding facilities for deprecating checks and keeping old names is not going to help much, but will certainly add support burden for us.

================
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
 
----------------
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.

================
Comment at: docs/clang-tidy/checks/performance-inefficient-algorithm.rst:3
@@ -2,3 +2,3 @@
 
-misc-inefficient-algorithm
+performance-inefficient-algorithm
 ==========================
----------------
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.

================
Comment at: docs/clang-tidy/checks/performance-inefficient-algorithm.rst:4
@@ -4,2 +3,3 @@
+performance-inefficient-algorithm
 ==========================
 
----------------
Please make the underlining the same length as the line above.


http://reviews.llvm.org/D16248





More information about the cfe-commits mailing list