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

Adrian Vogelsgesang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 2 14:11:47 PDT 2021


avogelsgesang added a comment.

> [...] If we want to follow container-size-empty's convention, we should include the replaced method in the name [...]

Note that this commit is slightly different from `container-size-empty`: it doesn't only replace `count(...)` by `contains(...)` but also replaces `find() == end()` by `contains`. So I guess the name would have to be `container-count-begin-end-contains` or similar... which would be a bit much in my opinion


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