[PATCH] D27815: [clang-tidy] Add obvious module for obvious bugs

Piotr Padlewski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 14:26:07 PST 2016

Prazek added a comment.

In https://reviews.llvm.org/D27815#624294, @Eugene.Zelenko wrote:

> I'm not sure that this is good name for module.
> Singe reason for this is check for STL algorithms, may be //stl// module is more correct destination?

The reason for this module is that I want to make a bunch of clang-tidy checks that are designed to help programmer find a bug in the recently written code. These check probably won't find any bugs in projects, because with example of the first check, either:
a) the code is dead
b) code is correct because we use 2 references to the same vector

in any other case the app would crash, so it only make sense to run this check while programming and looking for the bugs.

Other example of the check I want to write:

  for (int i = 0; i < n; i++) {
     for (int j = 0; i < n; j++) {

These are kinds of bugs that with 99% chances will be found during development, so the goal is to reduce programmer time ti find these kind of bugs.


More information about the cfe-commits mailing list