clang-tools 22.0.0git
|
Base class for handling converting std iterator algorithms to a range equivalent. More...
#include <UseRangesCheck.h>
Classes | |
struct | Indexes |
class | Replacer |
struct | ReverseIteratorDescriptor |
Public Types | |
using | Signature = SmallVector<Indexes, 2> |
using | ReplacerMap = llvm::StringMap<llvm::IntrusiveRefCntPtr<Replacer>> |
Public Member Functions | |
UseRangesCheck (StringRef Name, ClangTidyContext *Context) | |
virtual ReplacerMap | getReplacerMap () const =0 |
Gets a map of function to replace and methods to create the replacements. | |
virtual DiagnosticBuilder | createDiag (const CallExpr &Call) |
Create a diagnostic for the CallExpr Override this to support custom diagnostic messages. | |
virtual std::optional< ReverseIteratorDescriptor > | getReverseDescriptor () const |
virtual ArrayRef< std::pair< StringRef, StringRef > > | getFreeBeginEndMethods () const |
Gets the fully qualified names of begin and end functions. | |
void | registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) final |
void | registerMatchers (ast_matchers::MatchFinder *Finder) final |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) final |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
std::optional< TraversalKind > | getCheckTraversalKind () const override |
Base class for handling converting std iterator algorithms to a range equivalent.
Definition at line 26 of file utils/UseRangesCheck.h.
using clang::tidy::utils::UseRangesCheck::ReplacerMap = llvm::StringMap<llvm::IntrusiveRefCntPtr<Replacer>> |
Definition at line 62 of file utils/UseRangesCheck.h.
using clang::tidy::utils::UseRangesCheck::Signature = SmallVector<Indexes, 2> |
Definition at line 35 of file utils/UseRangesCheck.h.
clang::tidy::utils::UseRangesCheck::UseRangesCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 285 of file utils/UseRangesCheck.cpp.
References clang::tidy::utils::IncludeSorter().
|
final |
Definition at line 194 of file utils/UseRangesCheck.cpp.
References ArgName, BoundCall, createDiag(), FuncDecl, clang::tidy::utils::getFullPrefix(), clang::tidy::utils::UseRangesCheck::Replacer::getHeaderInclusion(), clang::tidy::utils::UseRangesCheck::Replacer::getReplacementSignatures(), clang::tidy::utils::UseRangesCheck::Replacer::getReplaceName(), clang::tidy::utils::removeFunctionArgs(), and clang::tidy::utils::UseRangesCheck::Indexes::Second.
|
virtual |
Create a diagnostic for the CallExpr Override this to support custom diagnostic messages.
Reimplemented in clang::tidy::boost::UseRangesCheck, and clang::tidy::llvm_check::UseRangesCheck.
Definition at line 305 of file utils/UseRangesCheck.cpp.
Referenced by check().
|
override |
Definition at line 319 of file utils/UseRangesCheck.cpp.
|
virtual |
Gets the fully qualified names of begin and end functions.
The functions must take the container as their one and only argument ::std::begin and ::std::end are a common example
Reimplemented in clang::tidy::boost::UseRangesCheck, clang::tidy::llvm_check::UseRangesCheck, and clang::tidy::modernize::UseRangesCheck.
Definition at line 315 of file utils/UseRangesCheck.cpp.
Referenced by registerMatchers().
|
pure virtual |
Gets a map of function to replace and methods to create the replacements.
Implemented in clang::tidy::boost::UseRangesCheck, clang::tidy::llvm_check::UseRangesCheck, and clang::tidy::modernize::UseRangesCheck.
Referenced by registerMatchers().
|
virtual |
Reimplemented in clang::tidy::boost::UseRangesCheck, and clang::tidy::modernize::UseRangesCheck.
Definition at line 310 of file utils/UseRangesCheck.cpp.
Referenced by registerMatchers().
|
override |
Definition at line 280 of file utils/UseRangesCheck.cpp.
|
final |
|
final |
Definition at line 291 of file utils/UseRangesCheck.cpp.
|
override |
Definition at line 296 of file utils/UseRangesCheck.cpp.
Referenced by clang::tidy::boost::UseRangesCheck::storeOptions(), and clang::tidy::modernize::UseRangesCheck::storeOptions().