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

Emits a warning about temporary objects whose type is (or is derived from) a class that has 'EXCEPTION', 'Exception' or 'exception' in its name. More...

#include <ThrowKeywordMissingCheck.h>

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

Public Member Functions

 ThrowKeywordMissingCheck (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
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Emits a warning about temporary objects whose type is (or is derived from) a class that has 'EXCEPTION', 'Exception' or 'exception' in its name.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/throw-keyword-missing.html

Definition at line 21 of file ThrowKeywordMissingCheck.h.

Constructor & Destructor Documentation

◆ ThrowKeywordMissingCheck()

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

Definition at line 23 of file ThrowKeywordMissingCheck.h.

Member Function Documentation

◆ check()

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

Definition at line 36 of file ThrowKeywordMissingCheck.cpp.

◆ getCheckTraversalKind()

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

Definition at line 30 of file ThrowKeywordMissingCheck.h.

◆ isLanguageVersionSupported()

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

Definition at line 25 of file ThrowKeywordMissingCheck.h.

◆ registerMatchers()

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

Definition at line 17 of file ThrowKeywordMissingCheck.cpp.


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