[PATCH] D27806: [clang-tidy] Add misc-invalid-range

Malcolm Parsons via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 08:01:45 PST 2016


malcolm.parsons added inline comments.


================
Comment at: clang-tidy/ClangTidy.cpp:296
   const auto &RegisteredCheckers =
-      AnalyzerOptions::getRegisteredCheckers(/*IncludeExperimental=*/false);
+      AnalyzerOptions::getRegisteredCheckers(/*IncludeExperimental=*/true);
   bool AnalyzerChecksEnabled = false;
----------------
Is this intentional?


================
Comment at: clang-tidy/misc/InvalidRangeCheck.cpp:40
+    CXX_AlgorithmNames +
+    "; std::all_of; std::any_of; std::none_of; std::find_if_not; "
+    "std::is_permutation; std::copy_n; std::copy_if; std::move; "
----------------
Extra `;` in string here or on line 36?


================
Comment at: docs/ReleaseNotes.rst:84
 
+- New `misc-invalid-range
+  <http://clang.llvm.org/extra/clang-tidy/checks/misc-invalid-range.html>`_ check
----------------
"invalid" < "use"


================
Comment at: docs/clang-tidy/checks/misc-invalid-range.rst:12
+
+It checks if first and second argument of call is call to ``begin()``
+and ``end()``, but on different objects (having different name).
----------------
What about the parallel versions of algorithms?


https://reviews.llvm.org/D27806





More information about the cfe-commits mailing list