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

Replace dynamic exception specifications, with noexcept (or user-defined macro) or noexcept(false). More...

#include <UseNoexceptCheck.h>

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

Public Member Functions

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

Replace dynamic exception specifications, with noexcept (or user-defined macro) or noexcept(false).

void foo() throw();
void bar() throw(int);
int foo()
Definition foo.cpp:2

Is converted to:

void foo() ;
void bar() noexcept(false);

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

Definition at line 30 of file UseNoexceptCheck.h.

Constructor & Destructor Documentation

◆ UseNoexceptCheck()

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

Definition at line 21 of file UseNoexceptCheck.cpp.

Member Function Documentation

◆ check()

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

Definition at line 52 of file UseNoexceptCheck.cpp.

References FuncDecl.

◆ isLanguageVersionSupported()

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

Definition at line 33 of file UseNoexceptCheck.h.

◆ registerMatchers()

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

Definition at line 31 of file UseNoexceptCheck.cpp.

References clang::tidy::modernize::isValid().

◆ storeOptions()

void clang::tidy::modernize::UseNoexceptCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 26 of file UseNoexceptCheck.cpp.


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