clang-tools
11.0.0
|
This class analysis if a FunctionDecl
can in principle throw an exception, either directly or indirectly.
More...
#include <ExceptionAnalyzer.h>
Classes | |
class | ExceptionInfo |
Bundle the gathered information about an entity like a function regarding it's exception behaviour. More... | |
Public Types | |
enum | State : std::int8_t { State::Throwing = 0, State::NotThrowing = 1, State::Unknown = 2 } |
Public Member Functions | |
ExceptionAnalyzer ()=default | |
void | ignoreBadAlloc (bool ShallIgnore) |
void | ignoreExceptions (llvm::StringSet<> ExceptionNames) |
ExceptionInfo | analyze (const FunctionDecl *Func) |
ExceptionInfo | analyze (const Stmt *Stmt) |
This class analysis if a FunctionDecl
can in principle throw an exception, either directly or indirectly.
It can be configured to ignore custom exception types.
Definition at line 24 of file ExceptionAnalyzer.h.
|
strong |
Enumerator | |
---|---|
Throwing | The function can definitely throw given an AST. |
NotThrowing | This function can not throw, given an AST. |
Unknown | This can happen for extern functions without available definition. |
Definition at line 26 of file ExceptionAnalyzer.h.
|
default |
ExceptionAnalyzer::ExceptionInfo clang::tidy::utils::ExceptionAnalyzer::analyze | ( | const FunctionDecl * | Func | ) |
Definition at line 250 of file ExceptionAnalyzer.cpp.
ExceptionAnalyzer::ExceptionInfo clang::tidy::utils::ExceptionAnalyzer::analyze | ( | const Stmt * | Stmt | ) |
Definition at line 255 of file ExceptionAnalyzer.cpp.
|
inline |
Definition at line 126 of file ExceptionAnalyzer.h.
|
inline |
Definition at line 127 of file ExceptionAnalyzer.h.