llvm-project
49d464cc - [clang-tidy] Add llvm-use-vector-utils (#177722)

Commit
7 days ago
[clang-tidy] Add llvm-use-vector-utils (#177722) This new check suggests the following replacements: * `llvm::to_vector(llvm::map_range(X, Fn))` -> `llvm::map_to_vector(X, Fn)` * `llvm::to_vector(llvm::make_filter_range(X, Fn))` -> `llvm::filter_to_vector(X, Fn)` and add the `SmallVectorExtras.h` include when necessary. The check is called `vector-utils` because we may want to handle more cases in the future, like turning explicit calls to SmallVector constructor to `llvm::to_vector` (which lives in `SmallVector.h`, not `SmallVectorExtras.h`). Assisted-by: claude
Author
Parents
Loading