clang-tools 23.0.0git
clang::tidy::cppcoreguidelines::ProTypeConstCastCheck Class Reference

Imposes limitations on the use of const_cast within C++ code. More...

#include <ProTypeConstCastCheck.h>

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

Public Member Functions

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

Detailed Description

Imposes limitations on the use of const_cast within C++ code.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-type-const-cast.html

Definition at line 20 of file ProTypeConstCastCheck.h.

Constructor & Destructor Documentation

◆ ProTypeConstCastCheck()

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

Definition at line 32 of file ProTypeConstCastCheck.cpp.

Member Function Documentation

◆ check()

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

◆ getCheckTraversalKind()

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

Definition at line 29 of file ProTypeConstCastCheck.h.

◆ isLanguageVersionSupported()

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

Definition at line 23 of file ProTypeConstCastCheck.h.

◆ registerMatchers()

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

Definition at line 41 of file ProTypeConstCastCheck.cpp.

◆ storeOptions()

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

Definition at line 37 of file ProTypeConstCastCheck.cpp.


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