[clang-tools-extra] [clang-tidy] Add new check 'llvm-use-ranges' (PR #152047)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 5 00:40:08 PDT 2025


vbvictor wrote:

> Thank you for coming up with this! It might be a very hacky thing to say, but could we exclude `llvm::sort` from the list? Changing `std::sort` to `llvm::sort` sometimes changes the underlying sort algorithm, and that breaks the order of "tie" elements. That in turn breaks tests.
> 
> By the way, you might want to add support for `llvm::stable_sort`, which is a lot more "peaceful" than `llvm::sort`. Thanks!

Thank you for the insights, removed `std::sort` from check in favor of `std::stable_sort`.

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


More information about the cfe-commits mailing list