Make test more lenient for custom clang version strings
[llvm-project.git] / clang-tools-extra / clang-tidy / modernize / UseRangesCheck.h
blob2f4cace653cf196022363eaaad49ca98e054293a
1 //===--- UseRangesCheck.h - clang-tidy --------------------------*- C++ -*-===//
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-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USERANGESCHECK_H
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USERANGESCHECK_H
12 #include "../utils/UseRangesCheck.h"
14 namespace clang::tidy::modernize {
16 /// Detects calls to standard library iterator algorithms that could be
17 /// replaced with a ranges version instead
18 ///
19 /// For the user-facing documentation see:
20 /// http://clang.llvm.org/extra/clang-tidy/checks/modernize/use-ranges.html
21 class UseRangesCheck : public utils::UseRangesCheck {
22 public:
23 UseRangesCheck(StringRef CheckName, ClangTidyContext *Context);
25 void storeOptions(ClangTidyOptions::OptionMap &Options) override;
27 ReplacerMap getReplacerMap() const override;
29 ArrayRef<std::pair<StringRef, StringRef>>
30 getFreeBeginEndMethods() const override;
32 std::optional<ReverseIteratorDescriptor>
33 getReverseDescriptor() const override;
35 bool isLanguageVersionSupported(const LangOptions &LangOpts) const override;
37 private:
38 bool UseReversePipe;
41 } // namespace clang::tidy::modernize
43 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USERANGESCHECK_H