brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · c698a4c Raw
34 lines · c
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USERANGESCHECK_H10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USERANGESCHECK_H11 12#include "../utils/UseRangesCheck.h"13 14namespace clang::tidy::llvm_check {15 16/// Finds calls to STL iterator algorithms that can be replaced with LLVM17/// range-based algorithms from `llvm/ADT/STLExtras.h`.18///19/// For the user-facing documentation see:20/// https://clang.llvm.org/extra/clang-tidy/checks/llvm/use-ranges.html21class UseRangesCheck : public utils::UseRangesCheck {22public:23  UseRangesCheck(StringRef Name, ClangTidyContext *Context);24 25  ReplacerMap getReplacerMap() const override;26  DiagnosticBuilder createDiag(const CallExpr &Call) override;27  ArrayRef<std::pair<StringRef, StringRef>>28  getFreeBeginEndMethods() const override;29};30 31} // namespace clang::tidy::llvm_check32 33#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_USERANGESCHECK_H34