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

Warns about code that tries to cast between pointers by means of std::bit_cast or memcpy. More...

#include <BitwisePointerCastCheck.h>

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

Public Member Functions

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

Detailed Description

Warns about code that tries to cast between pointers by means of std::bit_cast or memcpy.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/bitwise-pointer-cast.html

Definition at line 21 of file BitwisePointerCastCheck.h.

Constructor & Destructor Documentation

◆ BitwisePointerCastCheck()

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

Definition at line 23 of file BitwisePointerCastCheck.h.

Member Function Documentation

◆ check()

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

Definition at line 36 of file BitwisePointerCastCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::bugprone::BitwisePointerCastCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file BitwisePointerCastCheck.h.

◆ registerMatchers()

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

Definition at line 16 of file BitwisePointerCastCheck.cpp.


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