nicovank wrote:

> ... and is sufficiently visible.

I added `isPublic`, I think the false negatives where we are in another private 
method would be exceedingly rare so I don't think handling that case is 
necessary.

> check if the type of the parameter from the called method and that of the 
> `contains function` are equal.

Checking types turns out is very tricky because of casting, conversions, 
references, pointers, amplified by template types which these classes typically 
have. Is there any other checks doing this? I wrote a version that works but 
adds some complexity. On llvm-project, there are 5 cases not matched by this 
version that previously were without checking types (546/551), still 
investigating what's going on with those.

FWIW in `modernize-use-starts-ends-with` I didn't add type-checking: 
[UseStartsEndsWithCheck.cpp#L26-L30](https://github.com/llvm/llvm-project/blob/b3f3c0c63358b412348022d10308b97332d02bcd/clang-tools-extra/clang-tidy/modernize/UseStartsEndsWithCheck.cpp#L26-L30).


https://github.com/llvm/llvm-project/pull/107521
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to