brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · cd84465 Raw
45 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_BOOST_USERANGESCHECK_H10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BOOST_USERANGESCHECK_H11 12#include "../utils/UseRangesCheck.h"13 14namespace clang::tidy::boost {15 16/// Detects calls to standard library iterator algorithms that could be17/// replaced with a boost ranges version instead18///19/// For the user-facing documentation see:20/// https://clang.llvm.org/extra/clang-tidy/checks/boost/use-ranges.html21class UseRangesCheck : public utils::UseRangesCheck {22public:23  UseRangesCheck(StringRef Name, ClangTidyContext *Context);24 25  void storeOptions(ClangTidyOptions::OptionMap &Opts) override;26 27  ReplacerMap getReplacerMap() const override;28 29  DiagnosticBuilder createDiag(const CallExpr &Call) override;30 31  ArrayRef<std::pair<StringRef, StringRef>>32  getFreeBeginEndMethods() const override;33 34  std::optional<ReverseIteratorDescriptor>35  getReverseDescriptor() const override;36 37private:38  bool IncludeBoostSystem;39  bool UseReversePipe;40};41 42} // namespace clang::tidy::boost43 44#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BOOST_USERANGESCHECK_H45