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

Finds functions where throwing exceptions is unsafe but the function is still marked as potentially throwing. More...

#include <UnsafeToAllowExceptionsCheck.h>

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

Public Member Functions

 UnsafeToAllowExceptionsCheck (StringRef Name, ClangTidyContext *Context)
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Finds functions where throwing exceptions is unsafe but the function is still marked as potentially throwing.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unsafe-to-allow-exceptions.html

Definition at line 21 of file UnsafeToAllowExceptionsCheck.h.

Constructor & Destructor Documentation

◆ UnsafeToAllowExceptionsCheck()

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

Definition at line 25 of file UnsafeToAllowExceptionsCheck.cpp.

Member Function Documentation

◆ check()

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

Definition at line 50 of file UnsafeToAllowExceptionsCheck.cpp.

◆ isLanguageVersionSupported()

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

Definition at line 24 of file UnsafeToAllowExceptionsCheck.h.

◆ registerMatchers()

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

Definition at line 37 of file UnsafeToAllowExceptionsCheck.cpp.

◆ storeOptions()

void clang::tidy::bugprone::UnsafeToAllowExceptionsCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

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