[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

Adrian Vogelsgesang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 28 03:44:02 PDT 2021


avogelsgesang added a comment.

> Why readability-, if the intent is to make users move to a newer API?

My line of thinking was:

1. The very similar `readability-container-size-empty` pass is also a readability pass.
2. The main reason why I want people to use `contains` over `count` is because of readability. For this rule, I want to use modern C++20, not because my intent is to "modernize" per se, but because my intent is to make the C++ code more readable afterwards

That being said, I don't care strongly about `readability-` vs. `modernize-` and if you prefer, I can move the check to `modernize`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112646



More information about the cfe-commits mailing list