clang-tools 22.0.0git
clang::tidy::readability::NonConstParameterCheck Class Reference

Warn when a pointer function parameter can be const. More...

#include <NonConstParameterCheck.h>

Inheritance diagram for clang::tidy::readability::NonConstParameterCheck:
[legend]

Public Member Functions

 NonConstParameterCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
void onEndOfTranslationUnit () override
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Warn when a pointer function parameter can be const.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/non-const-parameter.html

Definition at line 20 of file NonConstParameterCheck.h.

Constructor & Destructor Documentation

◆ NonConstParameterCheck()

clang::tidy::readability::NonConstParameterCheck::NonConstParameterCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 22 of file NonConstParameterCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::readability::NonConstParameterCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 37 of file NonConstParameterCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::readability::NonConstParameterCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 27 of file NonConstParameterCheck.h.

◆ onEndOfTranslationUnit()

void clang::tidy::readability::NonConstParameterCheck::onEndOfTranslationUnit ( )
override

Definition at line 136 of file NonConstParameterCheck.cpp.

◆ registerMatchers()

void clang::tidy::readability::NonConstParameterCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 17 of file NonConstParameterCheck.cpp.


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