clang-tools 22.0.0git
clang::tidy::bugprone::CastingThroughVoidCheck Class Reference

Detects unsafe or redundant two-step casting operations involving void*. More...

#include <CastingThroughVoidCheck.h>

Inheritance diagram for clang::tidy::bugprone::CastingThroughVoidCheck:
[legend]

Public Member Functions

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

Detailed Description

Detects unsafe or redundant two-step casting operations involving void*.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/casting-through-void.html

Definition at line 19 of file CastingThroughVoidCheck.h.

Constructor & Destructor Documentation

◆ CastingThroughVoidCheck()

clang::tidy::bugprone::CastingThroughVoidCheck::CastingThroughVoidCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 21 of file CastingThroughVoidCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::bugprone::CastingThroughVoidCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 36 of file CastingThroughVoidCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::bugprone::CastingThroughVoidCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 25 of file CastingThroughVoidCheck.h.

◆ registerMatchers()

void clang::tidy::bugprone::CastingThroughVoidCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 19 of file CastingThroughVoidCheck.cpp.


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