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

Finds calls to 'new' that may throw unhandled exception at allocation failure. More...

#include <UnhandledExceptionAtNewCheck.h>

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

Public Member Functions

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

Finds calls to 'new' that may throw unhandled exception at allocation failure.

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

Definition at line 21 of file UnhandledExceptionAtNewCheck.h.

Constructor & Destructor Documentation

◆ UnhandledExceptionAtNewCheck()

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

Definition at line 42 of file UnhandledExceptionAtNewCheck.cpp.

Member Function Documentation

◆ check()

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

Definition at line 68 of file UnhandledExceptionAtNewCheck.cpp.

◆ isLanguageVersionSupported()

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

Definition at line 25 of file UnhandledExceptionAtNewCheck.h.

◆ registerMatchers()

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

Definition at line 46 of file UnhandledExceptionAtNewCheck.cpp.


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