clang-tools
20.0.0git
llvm-project
clang-tools-extra
clang-tidy
boost
boost/UseRangesCheck.h
Go to the documentation of this file.
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
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BOOST_USERANGESCHECK_H
10
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BOOST_USERANGESCHECK_H
11
12
#include "../utils/UseRangesCheck.h"
13
14
namespace
clang::tidy::boost
{
15
16
/// Detects calls to standard library iterator algorithms that could be
17
/// replaced with a boost ranges version instead
18
///
19
/// For the user-facing documentation see:
20
/// http://clang.llvm.org/extra/clang-tidy/checks/boost/use-ranges.html
21
class
UseRangesCheck
:
public
utils::UseRangesCheck
{
22
public
:
23
UseRangesCheck
(StringRef
Name
,
ClangTidyContext
*Context);
24
25
void
storeOptions
(
ClangTidyOptions::OptionMap
&
Options
)
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
37
private
:
38
bool
IncludeBoostSystem;
39
bool
UseReversePipe;
40
};
41
42
}
// namespace clang::tidy::boost
43
44
#endif
// LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BOOST_USERANGESCHECK_H
Name
llvm::SmallString< 256U > Name
Definition:
ChainedComparisonCheck.cpp:42
clang::tidy::ClangTidyCheck::Options
OptionsView Options
Definition:
ClangTidyCheck.h:490
clang::tidy::ClangTidyContext
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Definition:
ClangTidyDiagnosticConsumer.h:69
clang::tidy::boost::UseRangesCheck
Detects calls to standard library iterator algorithms that could be replaced with a boost ranges vers...
Definition:
boost/UseRangesCheck.h:21
clang::tidy::boost::UseRangesCheck::getFreeBeginEndMethods
ArrayRef< std::pair< StringRef, StringRef > > getFreeBeginEndMethods() const override
Gets the fully qualified names of begin and end functions.
Definition:
boost/UseRangesCheck.cpp:350
clang::tidy::boost::UseRangesCheck::createDiag
DiagnosticBuilder createDiag(const CallExpr &Call) override
Create a diagnostic for the CallExpr Override this to support custom diagnostic messages.
Definition:
boost/UseRangesCheck.cpp:343
clang::tidy::boost::UseRangesCheck::storeOptions
void storeOptions(ClangTidyOptions::OptionMap &Options) override
Should store all options supported by this check with their current values or default values for opti...
Definition:
boost/UseRangesCheck.cpp:337
clang::tidy::boost::UseRangesCheck::getReplacerMap
ReplacerMap getReplacerMap() const override
Gets a map of function to replace and methods to create the replacements.
Definition:
boost/UseRangesCheck.cpp:202
clang::tidy::boost::UseRangesCheck::getReverseDescriptor
std::optional< ReverseIteratorDescriptor > getReverseDescriptor() const override
Definition:
boost/UseRangesCheck.cpp:361
clang::tidy::utils::UseRangesCheck
Base class for handling converting std iterator algorithms to a range equivalent.
Definition:
utils/UseRangesCheck.h:26
clang::tidy::utils::UseRangesCheck::ReplacerMap
llvm::StringMap< llvm::IntrusiveRefCntPtr< Replacer > > ReplacerMap
Definition:
utils/UseRangesCheck.h:62
clang::tidy::boost
Definition:
BoostTidyModule.cpp:17
clang::tidy::ClangTidyOptions::OptionMap
llvm::StringMap< ClangTidyValue > OptionMap
Definition:
ClangTidyOptions.h:126
Generated on Sat Dec 21 2024 14:58:51 for clang-tools by
1.9.6