clang-tools 20.0.0git
|
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 class | State { Throwing , NotThrowing , Unknown } |
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 22 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 24 of file ExceptionAnalyzer.h.
|
default |
ExceptionAnalyzer::ExceptionInfo clang::tidy::utils::ExceptionAnalyzer::analyze | ( | const FunctionDecl * | Func | ) |
Definition at line 631 of file ExceptionAnalyzer.cpp.
ExceptionAnalyzer::ExceptionInfo clang::tidy::utils::ExceptionAnalyzer::analyze | ( | const Stmt * | Stmt | ) |
Definition at line 635 of file ExceptionAnalyzer.cpp.
|
inline |
Definition at line 120 of file ExceptionAnalyzer.h.
Referenced by clang::tidy::bugprone::ExceptionEscapeCheck::ExceptionEscapeCheck(), and clang::tidy::openmp::ExceptionEscapeCheck::ExceptionEscapeCheck().
|
inline |
Definition at line 121 of file ExceptionAnalyzer.h.
Referenced by clang::tidy::bugprone::ExceptionEscapeCheck::ExceptionEscapeCheck(), and clang::tidy::openmp::ExceptionEscapeCheck::ExceptionEscapeCheck().