clang-tools 23.0.0git
clang::tidy::bugprone::StdExceptionBaseclassCheck Class Reference

Check for thrown exceptions and enforce they are all derived from std::exception. More...

#include <StdExceptionBaseclassCheck.h>

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

Public Member Functions

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

Detailed Description

Check for thrown exceptions and enforce they are all derived from std::exception.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/std-exception-baseclass.html

Definition at line 21 of file StdExceptionBaseclassCheck.h.

Constructor & Destructor Documentation

◆ StdExceptionBaseclassCheck()

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

Definition at line 23 of file StdExceptionBaseclassCheck.h.

Member Function Documentation

◆ check()

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

Definition at line 37 of file StdExceptionBaseclassCheck.cpp.

◆ isLanguageVersionSupported()

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

Definition at line 25 of file StdExceptionBaseclassCheck.h.

◆ registerMatchers()

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

Definition at line 17 of file StdExceptionBaseclassCheck.cpp.


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