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

Finds calls of memory manipulation functions memset(), memcpy() and / memmove() on non-TriviallyCopyable objects resulting in undefined behavior. More...

#include <UndefinedMemoryManipulationCheck.h>

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

Public Member Functions

 UndefinedMemoryManipulationCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Finds calls of memory manipulation functions memset(), memcpy() and / memmove() on non-TriviallyCopyable objects resulting in undefined behavior.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/undefined-memory-manipulation.html

Definition at line 22 of file UndefinedMemoryManipulationCheck.h.

Constructor & Destructor Documentation

◆ UndefinedMemoryManipulationCheck()

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

Definition at line 24 of file UndefinedMemoryManipulationCheck.h.

Member Function Documentation

◆ check()

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

Definition at line 51 of file UndefinedMemoryManipulationCheck.cpp.

◆ registerMatchers()

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

Definition at line 24 of file UndefinedMemoryManipulationCheck.cpp.


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