[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #162741)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 11 08:16:58 PDT 2025


vbvictor wrote:

> I realise that suggesting llvm::any_of or llvm::all_of on short for loops is my personal preference. It is not listed in llvm coding standards. Please ignore these suggestions if you don't like them.

I think that `any_of`/`all_of` is preferred to code readability and there is effort to enable clang-tidy rule for it: https://github.com/llvm/llvm-project/issues/156161. (At least I'd like it to be enabled, but we will discuss usefulness when PR is done)

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


More information about the cfe-commits mailing list