kazutakahirata wrote:

> As a side note, should we create a clang-tidy check to detect these cases 
> automatically: to use `llvm` algorithms instead of `std` and so on? Is it 
> documented that we should always prefer the `llvm` version? I see a lot of 
> work by @kazutakahirata and wish to make it future-proof because any new 
> contributor could use `std` version as it is the most familiar one.

Yes, a clang-tidy check would be useful.  Detecting the case in this particular 
PR may require some heuristics though.  For example, if we see 
`enumerator_begin()` and `enumerator_end()`, then check for `enumerators()` 
(the plural form after removing `begin`).

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

Reply via email to