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

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 26 12:50:56 PST 2016


Quuxplusone added a comment.

PVS-Studio implements tons of checks of this variety. See e.g.
http://www.viva64.com/en/b/0299/#ID0E4KBM
They don't have a catchy name for the category either, but perhaps "suspicious-" or "copypaste-" would do.

I agree with Aaron that "thinko-" would be a little inappropriate for a user-facing name, and besides, I personally would not call this kind of error a "thinko". A thinko stems from a "brain fart", i.e. when you momentarily believe something that in hindsight is obviously false; e.g. writing code for a case that can't ever be hit in practice, or choosing the wrong algorithm because you misunderstood the problem to be solved. The kind of error I'm thinking of in //this// case stems from //not thinking at all//, e.g. incomplete copy-pasting, or writing `(ch != 'A' || ch != 'a')`, or whatever.


https://reviews.llvm.org/D27815





More information about the cfe-commits mailing list