clang-tools 22.0.0git
clang::tidy::cppcoreguidelines::MissingStdForwardCheck Class Reference

Warns when a function accepting a forwarding reference does anything besides forwarding (with std::forward) the parameter in the body of the function. More...

#include <MissingStdForwardCheck.h>

Inheritance diagram for clang::tidy::cppcoreguidelines::MissingStdForwardCheck:
[legend]

Public Member Functions

 MissingStdForwardCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
std::optional< TraversalKind > getCheckTraversalKind () const override
void storeOptions (ClangTidyOptions::OptionMap &Opts) override

Detailed Description

Warns when a function accepting a forwarding reference does anything besides forwarding (with std::forward) the parameter in the body of the function.

This check implement CppCoreGuideline F.19.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/missing-std-forward.html

Definition at line 22 of file MissingStdForwardCheck.h.

Constructor & Destructor Documentation

◆ MissingStdForwardCheck()

clang::tidy::cppcoreguidelines::MissingStdForwardCheck::MissingStdForwardCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 151 of file MissingStdForwardCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::cppcoreguidelines::MissingStdForwardCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 139 of file MissingStdForwardCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::cppcoreguidelines::MissingStdForwardCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 30 of file MissingStdForwardCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::cppcoreguidelines::MissingStdForwardCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file MissingStdForwardCheck.h.

◆ registerMatchers()

void clang::tidy::cppcoreguidelines::MissingStdForwardCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 89 of file MissingStdForwardCheck.cpp.

◆ storeOptions()

void clang::tidy::cppcoreguidelines::MissingStdForwardCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 156 of file MissingStdForwardCheck.cpp.


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