clang-tools 22.0.0git
clang::tidy::performance::ForRangeCopyCheck Class Reference

A check that detects copied loop variables and suggests using const references. More...

#include <ForRangeCopyCheck.h>

Inheritance diagram for clang::tidy::performance::ForRangeCopyCheck:
[legend]

Public Member Functions

 ForRangeCopyCheck (StringRef Name, ClangTidyContext *Context)
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

A check that detects copied loop variables and suggests using const references.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/performance/for-range-copy.html

Definition at line 20 of file ForRangeCopyCheck.h.

Constructor & Destructor Documentation

◆ ForRangeCopyCheck()

clang::tidy::performance::ForRangeCopyCheck::ForRangeCopyCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 22 of file ForRangeCopyCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::performance::ForRangeCopyCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 61 of file ForRangeCopyCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::performance::ForRangeCopyCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 23 of file ForRangeCopyCheck.h.

◆ registerMatchers()

void clang::tidy::performance::ForRangeCopyCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

◆ storeOptions()

void clang::tidy::performance::ForRangeCopyCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

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