[libcxx-commits] [PATCH] D120925: [libc++] Enable more clang-tidy checks and list potential candidates

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 3 12:38:30 PST 2022


philnik added a comment.

In D120925#3357999 <https://reviews.llvm.org/D120925#3357999>, @ldionne wrote:

> I am favourable to this patch, however I think we all need to be on the same page that `clang-tidy` is not the absolute truth -- if we write some code that we deem valid or good for some reason, and if `clang-tidy` thinks the code is smelly, I don't want us to start blindly trying to satisfy `clang-tidy`. IOW, this is a tool to help **us** write better code -- it can't make decisions for us.

I'd like to add the invariant that there has to be a comment explaining why clang-tidy is wrong somewhere. If clang-tidy complains it probably looks like a smell to a human reader, or it is a clang-tidy bug in which case we should add a link to the bug report. I'd also like to avoid a plain `// NOLINT` (and variants). Using `// NOLINT(check)` (and variants) makes it clear what clang-tidy warns about.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120925/new/

https://reviews.llvm.org/D120925



More information about the libcxx-commits mailing list