clang-tools 19.0.0git
Public Types | Public Member Functions | List of all members
clang::tidy::utils::ExceptionSpecAnalyzer Class Reference

This class analysis if a FunctionDecl has been declared implicitly through defaulting or explicitly as throwing or not and evaluates noexcept expressions if needed. More...

#include <ExceptionSpecAnalyzer.h>

Public Types

enum class  State { Throwing , NotThrowing , Unknown }
 

Public Member Functions

 ExceptionSpecAnalyzer ()=default
 
State analyze (const FunctionDecl *FuncDecl)
 

Detailed Description

This class analysis if a FunctionDecl has been declared implicitly through defaulting or explicitly as throwing or not and evaluates noexcept expressions if needed.

Unlike the ExceptionAnalyzer however it can't tell you if the function will actually throw an exception or not.

Definition at line 21 of file ExceptionSpecAnalyzer.h.

Member Enumeration Documentation

◆ State

Enumerator
Throwing 

This function has been declared as possibly throwing.

NotThrowing 

This function has been declared as not throwing.

Unknown 

We're unable to tell if this function is declared as throwing or not.

Definition at line 23 of file ExceptionSpecAnalyzer.h.

Constructor & Destructor Documentation

◆ ExceptionSpecAnalyzer()

clang::tidy::utils::ExceptionSpecAnalyzer::ExceptionSpecAnalyzer ( )
default

Member Function Documentation

◆ analyze()

ExceptionSpecAnalyzer::State clang::tidy::utils::ExceptionSpecAnalyzer::analyze ( const FunctionDecl *  FuncDecl)

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