clang-tools 22.0.0git
clang::tidy::modernize::UseUncaughtExceptionsCheck Class Reference

This check will warn on calls to std::uncaught_exception and replace them with calls to std::uncaught_exceptions, since std::uncaught_exception was deprecated in C++17. More...

#include <UseUncaughtExceptionsCheck.h>

Inheritance diagram for clang::tidy::modernize::UseUncaughtExceptionsCheck:
[legend]

Public Member Functions

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

This check will warn on calls to std::uncaught_exception and replace them with calls to std::uncaught_exceptions, since std::uncaught_exception was deprecated in C++17.

In case of macro ID there will be only a warning without fixits.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-uncaught-exceptions.html

Definition at line 23 of file UseUncaughtExceptionsCheck.h.

Constructor & Destructor Documentation

◆ UseUncaughtExceptionsCheck()

clang::tidy::modernize::UseUncaughtExceptionsCheck::UseUncaughtExceptionsCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 25 of file UseUncaughtExceptionsCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::modernize::UseUncaughtExceptionsCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 48 of file UseUncaughtExceptionsCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::modernize::UseUncaughtExceptionsCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 27 of file UseUncaughtExceptionsCheck.h.

◆ registerMatchers()

void clang::tidy::modernize::UseUncaughtExceptionsCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 17 of file UseUncaughtExceptionsCheck.cpp.


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