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

This check flags all use of C-style casts that perform a static_cast downcast, const_cast, or reinterpret_cast. More...

#include <ProTypeCstyleCastCheck.h>

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

Public Member Functions

 ProTypeCstyleCastCheck (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

Detailed Description

This check flags all use of C-style casts that perform a static_cast downcast, const_cast, or reinterpret_cast.

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

Definition at line 21 of file ProTypeCstyleCastCheck.h.

Constructor & Destructor Documentation

◆ ProTypeCstyleCastCheck()

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

Definition at line 23 of file ProTypeCstyleCastCheck.h.

Member Function Documentation

◆ check()

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

◆ isLanguageVersionSupported()

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

Definition at line 25 of file ProTypeCstyleCastCheck.h.

◆ registerMatchers()

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

Definition at line 30 of file ProTypeCstyleCastCheck.cpp.


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