[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 31 10:45:11 PDT 2024


https://github.com/PiotrZSL commented:

Overal looks fine.
Try spliting bigger parts of code int some lambdas or functions, so it could be more readable, consider adding some 1 line comments specially when fixes are created to point out what those insertions/replacement/deletions are.
Check code for missing checks (nullptr, iterators).

In general consider replacing some std::vector with llvm::SmallVector with some preallocated memofry, like for 2 or 32 elements, depend on needs

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


More information about the cfe-commits mailing list