[clang-tools-extra] [clang-tidy][readability-container-contains] Extend to any class with contains (PR #107521)

Nicolas van Kempen via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 20:32:01 PDT 2024


nicovank wrote:

I was over-complicating the task. Instead of trying to match the type of the parameter with the type of the argument, I can just match the types of both parameters. Since on "normal" containers methods will have the same signature minus name, this shouldn't remove any true positives due to conversions.

See updated simplified PR. Number of matches on llvm-project is the same with or without `hasParameter(0, ...)` clauses.


https://github.com/llvm/llvm-project/pull/107521


More information about the cfe-commits mailing list