clang-tools 22.0.0git
clang::tidy::hicpp::ExceptionBaseclassCheck Class Reference

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

#include <ExceptionBaseclassCheck.h>

Inheritance diagram for clang::tidy::hicpp::ExceptionBaseclassCheck:
[legend]

Public Member Functions

 ExceptionBaseclassCheck (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/hicpp/exception-baseclass.html

Definition at line 21 of file ExceptionBaseclassCheck.h.

Constructor & Destructor Documentation

◆ ExceptionBaseclassCheck()

clang::tidy::hicpp::ExceptionBaseclassCheck::ExceptionBaseclassCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file ExceptionBaseclassCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::hicpp::ExceptionBaseclassCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 37 of file ExceptionBaseclassCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::hicpp::ExceptionBaseclassCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file ExceptionBaseclassCheck.h.

◆ registerMatchers()

void clang::tidy::hicpp::ExceptionBaseclassCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 17 of file ExceptionBaseclassCheck.cpp.


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