ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
exception_specification.h
Go to the documentation of this file.
1#ifndef UTIL_EXCEPTION_SPECIFICATION_H
2#define UTIL_EXCEPTION_SPECIFICATION_H
3
4#include <util/irep/irep.h>
5#include <vector>
6
7class typet;
8
25{
26public:
39
43
45 std::vector<irep_idt> allowed_types;
46
49 bool is_restrictive() const
50 {
52 }
53
56 static exception_specificationt from_type(const typet &type);
57
59 static const char *kind_attribute()
60 {
61 return "exception_spec_kind";
62 }
63 static const char *types_attribute()
64 {
65 return "exception_spec_types";
66 }
67};
68
69#endif /* UTIL_EXCEPTION_SPECIFICATION_H */
Canonical, function-boundary C++ exception specification.
Definition exception_specification.h:25
static const char * types_attribute()
Definition exception_specification.h:63
static const char * kind_attribute()
Names of the named-sub attributes used on the typet.
Definition exception_specification.h:59
kindt
Definition exception_specification.h:28
@ potentially_throwing
No specification (or an explicitly throwing one): may throw anything.
Definition exception_specification.h:30
@ dynamic
Legacy dynamic spec throw(T...) (incl.
Definition exception_specification.h:37
@ non_throwing
C++11 noexcept (or noexcept(true)): violation calls std::terminate.
Definition exception_specification.h:32
kindt kind
Definition exception_specification.h:44
static exception_specificationt from_type(const typet &type)
Decode the specification stored on a function typet.
Definition exception_specification.cpp:4
bool is_restrictive() const
A restrictive spec can be violated at the function boundary.
Definition exception_specification.h:49
std::vector< irep_idt > allowed_types
Definition exception_specification.h:45
exception_specificationt()
Definition exception_specification.h:40
Definition type.h:9