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

Finds pthread_kill function calls when thread is terminated by / SIGTERM signal. More...

#include <BadSignalToKillThreadCheck.h>

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

Public Member Functions

 BadSignalToKillThreadCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
void registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override

Public Attributes

std::optional< unsigned > SigtermValue

Detailed Description

Finds pthread_kill function calls when thread is terminated by / SIGTERM signal.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/bad-signal-to-kill-thread.html

Definition at line 21 of file BadSignalToKillThreadCheck.h.

Constructor & Destructor Documentation

◆ BadSignalToKillThreadCheck()

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

Definition at line 23 of file BadSignalToKillThreadCheck.h.

Member Function Documentation

◆ check()

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

Definition at line 30 of file BadSignalToKillThreadCheck.cpp.

References clang::tidy::bugprone::PP, and SigtermValue.

◆ registerMatchers()

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

Definition at line 19 of file BadSignalToKillThreadCheck.cpp.

◆ registerPPCallbacks()

void clang::tidy::bugprone::BadSignalToKillThreadCheck::registerPPCallbacks ( const SourceManager & SM,
Preprocessor * PP,
Preprocessor * ModuleExpanderPP )
override

Definition at line 66 of file BadSignalToKillThreadCheck.cpp.

References clang::tidy::bugprone::PP.

Member Data Documentation

◆ SigtermValue

std::optional<unsigned> clang::tidy::bugprone::BadSignalToKillThreadCheck::SigtermValue

Definition at line 29 of file BadSignalToKillThreadCheck.h.

Referenced by check().


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