================ @@ -0,0 +1,41 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USEVECTORUTILSCHECK_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USEVECTORUTILSCHECK_H + +#include "../ClangTidyCheck.h" +#include "../utils/IncludeInserter.h" + +namespace clang::tidy::llvm_check { + +/// Finds calls to `llvm::to_vector(llvm::map_range(...))` and +/// `llvm::to_vector(llvm::make_filter_range(...))` that can be replaced with +/// `llvm::map_to_vector` and `llvm::filter_to_vector` from +/// `SmallVectorExtras.h`. +/// +/// For the user-facing documentation see: +/// https://clang.llvm.org/extra/clang-tidy/checks/llvm/use-vector-utils.html +class UseVectorUtilsCheck : public ClangTidyCheck { +public: + UseVectorUtilsCheck(StringRef Name, ClangTidyContext *Context); + bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { ---------------- kuhar wrote:
The order is not consistent among the llvm checks, but I moved it down https://github.com/llvm/llvm-project/pull/177722 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
