clang-tools 22.0.0git
clang::tidy::modernize::ReplaceRandomShuffleCheck Class Reference

std::random_shuffle will be removed as of C++17. More...

#include <ReplaceRandomShuffleCheck.h>

Inheritance diagram for clang::tidy::modernize::ReplaceRandomShuffleCheck:
[legend]

Public Member Functions

 ReplaceRandomShuffleCheck (StringRef Name, ClangTidyContext *Context)
void registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

std::random_shuffle will be removed as of C++17.

This check will find and replace all occurrences of std::random_shuffle with std::shuffle.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/replace-random-shuffle.html

Definition at line 22 of file ReplaceRandomShuffleCheck.h.

Constructor & Destructor Documentation

◆ ReplaceRandomShuffleCheck()

clang::tidy::modernize::ReplaceRandomShuffleCheck::ReplaceRandomShuffleCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 19 of file ReplaceRandomShuffleCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::modernize::ReplaceRandomShuffleCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 52 of file ReplaceRandomShuffleCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::modernize::ReplaceRandomShuffleCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file ReplaceRandomShuffleCheck.h.

◆ registerMatchers()

void clang::tidy::modernize::ReplaceRandomShuffleCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 26 of file ReplaceRandomShuffleCheck.cpp.

◆ registerPPCallbacks()

void clang::tidy::modernize::ReplaceRandomShuffleCheck::registerPPCallbacks ( const SourceManager & SM,
Preprocessor * PP,
Preprocessor * ModuleExpanderPP )
override

Definition at line 42 of file ReplaceRandomShuffleCheck.cpp.

◆ storeOptions()

void clang::tidy::modernize::ReplaceRandomShuffleCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 47 of file ReplaceRandomShuffleCheck.cpp.


The documentation for this class was generated from the following files: